Chops Net IP
|
Test scenarios for udp_entity_io
detail class.
More...
#include "catch2/catch_test_macros.hpp"
#include "asio/ip/udp.hpp"
#include "asio/io_context.hpp"
#include <system_error>
#include <cstddef>
#include <memory>
#include <utility>
#include <thread>
#include <future>
#include <chrono>
#include <vector>
#include <functional>
#include <algorithm>
#include <iterator>
#include <ranges>
#include <cassert>
#include "net_ip/detail/udp_entity_io.hpp"
#include "net_ip/basic_io_output.hpp"
#include "net_ip/io_type_decls.hpp"
#include "net_ip_component/worker.hpp"
#include "net_ip_component/error_delivery.hpp"
#include "net_ip_component/output_queue_stats.hpp"
#include "shared_test/msg_handling.hpp"
#include "shared_test/msg_handling_start_funcs.hpp"
#include "buffer/shared_buffer.hpp"
#include "utility/byte_array.hpp"
#include <iostream>
Typedefs | |
using | iosp = chops::net::detail::udp_entity_io_shared_ptr |
Functions | |
void | send_data (const vec_buf &msg_vec, int interval, const asio::ip::udp::endpoint &recv_endp, std::vector< iosp > &senders, bool send_buf_only) |
void | start_var_udp_senders (const vec_buf &in_msg_vec, bool reply, int interval, int num_senders, test_counter &send_cnt, asio::io_context &ioc, chops::net::err_wait_q &err_wq, const asio::ip::udp::endpoint &recv_endp) |
void | start_fixed_udp_sender (const vec_buf &fixed_msg_vec, int interval, asio::io_context &ioc, chops::net::err_wait_q &err_wq, const asio::ip::udp::endpoint &recv_endp) |
void | udp_test (const vec_buf &in_msg_vec, const vec_buf &fixed_msg_vec, bool reply, int interval, int num_senders) |
TEST_CASE ("Udp IO test, checking flexibility in ipv4 vs ipv6 sending", "[udp_io] ") | |
TEST_CASE ("Udp IO handler test, var len msgs, one-way, interval 20, senders 1", "[udp_io] [var_len_msg] [one_way] [interval_20] [senders_1]") | |
TEST_CASE ("Udp IO handler test, var len msgs, one-way, interval 0, senders 1", "[udp_io] [var_len_msg] [one-way] [interval_0] [senders_1]") | |
TEST_CASE ("Udp IO handler test, var len msgs, two-way, interval 20, senders 10", "[udp_io] [var_len_msg] [two-way] [interval_20] [senders_10]") | |
TEST_CASE ("Udp IO handler test, var len msgs, two-way, interval 20, senders 2, many msgs", "[udp_io] [var_len_msg] [two_way] [interval_20] [senders_2] [many]") | |
TEST_CASE ("Udp IO handler test, CR / LF msgs, one-way, interval 10, senders 5", "[udp_io] [cr_lf_msg] [one-way] [interval_10] [senders_5]") | |
TEST_CASE ("Udp IO handler test, CR / LF msgs, two-way, interval 20, senders 5", "[udp_io] [cr_lf_msg] [two-way] [interval_20] [senders_5]") | |
TEST_CASE ("Udp IO handler test, LF msgs, one-way, interval 20, senders 1", "[udp_io] [lf_msg] [two-way] [interval_20] [senders_1]") | |
TEST_CASE ("Udp IO handler test, LF msgs, two-way, interval 10, senders 10", "[udp_io] [lf_msg] [two-way] [interval_10] [senders_10]") | |
TEST_CASE ("Udp IO handler test, LF msgs, two-way, interval 10, senders 2, many msgs", "[udp_io] [lf_msg] [two-way] [interval_10] [senders_2] [many]") | |
Variables | |
const char * | test_addr = "127.0.0.1" |
constexpr int | test_port_base = 30665 |
constexpr int | num_msgs = 50 |
Test scenarios for udp_entity_io
detail class.
This test design is different in a few respects from the tcp_io, tcp_acceptor, and tcp_connector tests. In particular, multiple UDP senders are sending to one UDP receiver, so an empty message shutdown sequence won't work the same as with TCP connections (which are always one-to-one).
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)