Chops Net IP
|
Functions that collect and deliver output_queue_stats
from a sequence.
More...
#include <cstddef>
#include <numeric>
#include "net_ip/queue_stats.hpp"
#include "net_ip/basic_io_output.hpp"
Go to the source code of this file.
Functions | |
template<typename Iter > | |
output_queue_stats | chops::net::accumulate_output_queue_stats (Iter beg, Iter end) |
Accumulate output_queue_stats given a sequence of basic_io_output objects. | |
template<typename Iter , typename Cond > | |
void | chops::net::accumulate_output_queue_stats_until (Iter beg, Iter end, Cond &&cond) |
Accumulate output_queue_stats on a sequence of basic_io_output objects until a condition is satisfied. | |
template<typename IOT , typename Iter > | |
output_queue_stats | chops::net::accumulate_net_entity_output_queue_stats (Iter beg, Iter end) |
Accumulate output_queue_stats given a sequence of net_entity objects, using the visit_io_output method on each net_entity . | |
template<typename IOT , typename Iter , typename Cond > | |
void | chops::net::accumulate_net_entity_output_queue_stats_until (Iter beg, Iter end, Cond &&cond) |
Accumulate output_queue_stats on a sequence of net_entity objects until a condition is satisfied. | |
Functions that collect and deliver output_queue_stats
from a sequence.
Copyright (c) 2019 by Cliff Green
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
output_queue_stats chops::net::accumulate_net_entity_output_queue_stats | ( | Iter | beg, |
Iter | end ) |
Accumulate output_queue_stats
given a sequence of net_entity
objects, using the visit_io_output
method on each net_entity
.
IOT | Either chops::net::tcp_io or chops::net::udp_io . |
beg | Beginning iterator of sequence of net_entity objects. |
end | Ending iterator of sequence. |
output_queue_stats
containing accumulated statistics. void chops::net::accumulate_net_entity_output_queue_stats_until | ( | Iter | beg, |
Iter | end, | ||
Cond && | cond ) |
Accumulate output_queue_stats
on a sequence of net_entity
objects until a condition is satisfied.
Given a sequence of net_entity
objects, accumulate statistics until a supplied condition function object is satisfied.
beg | Beginning iterator of sequence of net_entity objects. |
end | Ending iterator of sequence. |
cond | Condition function object invoked after each accumulation, returning true causes accumulation loop to finish. |
output_queue_stats chops::net::accumulate_output_queue_stats | ( | Iter | beg, |
Iter | end ) |
Accumulate output_queue_stats
given a sequence of basic_io_output
objects.
The basic_io_output
object can be of either tcp_io_output
or udp_io_output
types.
basic_io_output
objects are associated with the same IO handler, the accumulated counts may be inflated. This does not matter if comparing against counts of 0.beg | Beginning iterator of sequence of basic_io_output objects. |
end | Ending iterator of sequence. |
output_queue_stats
containing accumulated statistics. void chops::net::accumulate_output_queue_stats_until | ( | Iter | beg, |
Iter | end, | ||
Cond && | cond ) |
Accumulate output_queue_stats
on a sequence of basic_io_output
objects until a condition is satisfied.
Given a sequence of basic_io_output
objects, accumulate statistics until a supplied condition function object is satisfied.
The condition object typically checks for a specific count of 0 or similar. It must have a signature of:
It is highly recommended that a sleep or other blocking operation is performed when the condition returns false
, otherwise a tight processing loop will occur.
For example:
beg | Beginning iterator of sequence of basic_io_output objects. |
end | Ending iterator of sequence. |
cond | Condition function object invoked after each accumulation, returning true causes accumulation loop to finish. |