Skip to content

Commit 24edefe

Browse files
Merge pull request #57 from connectivecpp/develop
doc updates, tweaked tcp connector test sizes
2 parents 2f16588 + 138b0e0 commit 24edefe

File tree

6 files changed

+17
-35
lines changed

6 files changed

+17
-35
lines changed

doc/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

doc/Doxyfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,6 @@ FILE_PATTERNS = *.c \
939939
*.qsf \
940940
*.jpg \
941941
*.png \
942-
*.svg \
943942
*.ice
944943

945944
# The RECURSIVE tag can be used to specify whether or not subdirectories should

doc/lib_comparison.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ The secondary criteria includes:
1515
- Highly scalable
1616
- Bi-directional data flow
1717

18-
## Asio and C++ Networking TS
18+
## Asio and C++ Networking Standardization
1919

20-
Asio provides the foundation and underlying asynchronous model for Chops Net IP. The C++ Networking TS is still in development, awaiting standardization and modularization of core components such as executors. Chops Net IP provides usage and abstraction advantages as outlined in the overview documentation.
20+
Asio provides the foundation and underlying asynchronous model for Chops Net IP. C++ standardization efforts for networking have been ongoing for years (over a decade), with a major part of the effort working on `std::execution` (which covers many areas besides networking). If a C++ networking standard becomes official, Chops Net IP and Asio will likely change accordingly.
2121

2222
## ACE
2323

doc/overview.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Even though an implicit state transition table exists within the Chops Net IP li
6060

6161
Pro tip - Chops Net IP follows the implicit state model of the Asio library (and similar libraries) where state transitions are implemented through chaining function objects on asynchronous operations. Developers familiar with implicit or explicit state transition models will be familiar with the application model defined for Chops Net IP. Chops Net IP insulates the application from the intricacies of the Asio library and simplifies the state transition details.
6262

63-
![Image of Chops Net IP objects and states](object_states_diagram.png)
63+
[Click for image of Chops Net IP objects and states](object_states_diagram.png)
6464

6565
## Constraints
6666

@@ -132,9 +132,9 @@ Future versions of the library may have more move semantics and less reference c
132132

133133
Most of the Chops Net IP public classes (`net_entity`, `basic_io_interface`, `basic_io_output`) use `std::weak_ptr` references to the internal reference counted objects. This means that application code which ignores state changes (e.g. a TCP connection that has ended) will have errors returned by the Chops Net IP library when trying to access a non-existent object (e.g. trying to send data through a TCP connection that has gone away). This is preferred to "dangling pointers" that result in process crashes or requiring the application to continually query the Chops Net IP library for state information.
134134

135-
![Image of Chops Net IP Tcp Acceptor internal](tcp_acceptor_internal_diagram.png)
135+
[Click for image of Chops Net IP Tcp Acceptor internal](tcp_acceptor_internal_diagram.png)
136136

137-
![Image of Chops Net IP Tcp Connector and UDP internal](tcp_connector_udp_internal_diagram.png)
137+
[Click for image of Chops Net IP Tcp Connector and UDP internal](tcp_connector_udp_internal_diagram.png)
138138

139139
Where to provide the customization points in the API is one of the most crucial design choices. Using template parameters for function objects and passing them through call chains is preferred to storing the function object in a `std::function`. In general, performance critical paths, primarily reading and writing data, always use function objects passed through as template parameters, while less performance critical paths may use a `std::function`.
140140

@@ -147,10 +147,9 @@ Many of the public methods that call into internal handlers use a `std::future`
147147
## Future Directions
148148

149149
- Strand design and support will be considered and likely implemented, allowing thread pools to be used for a given `net_ip` instance, instead of limiting it to a single thread.
150-
- Older compiler (along with older C++ standard) support is likely to be implemented, depending on availability and collaboration support.
150+
- Older compiler (along with older C++ standard) support may be implemented, depending on availability and collaboration support.
151151
- The outgoing queue container is likely to become a template parameter. This would allow circular buffers (ring spans) or other data structures to be used instead of the default `std::queue` (which is instantiated to use a `std::deque`).
152152
- The reference counted outgoing buffer type is likely to become a template parameter, allowing applications to use a different reference counting scheme, or a wrapper over some form of static memory (the requirement will be that the memory is valid while the write is in progress). Alternatively, a generic copy and move, versus reference counting, may be supported in future versions.
153-
- Containers used internally in Chops Net IP (other than the outgoing queue) may also be templatized. These include the container used in the TCP acceptor for TCP connection objects, and the container used in the `net_ip` object that holds all of the network entities.
154153
- SSL or TLS support may be added, depending on collaborators with expertise being available.
155154
- Additional protocols may be added, but would be in a separate library (Bluetooth, serial I/O, MQTT, etc). Chops Net IP focuses on TCP, UDP unicast, and UDP multicast support. If a reliable UDP multicast protocol is popular enough, support may be added.
156155

doc/release.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Chops Net IP Release Status
22

3-
## Release 1.0
3+
## Release 1.x
44

5-
Release 1.0 is under development, expected in the first part of 2020. The functionality is already well tested under g++ and clang++ on Linux, MacOS, and Raspbian, but needs additional testing on other compilers and platforms including VC++ on Windows.
5+
(Fill in details.)
66

77
### Next Steps, ToDo's, Problems, and Constraints:
88

9-
- The CMake files (CMakeLists.txts, etc) are working but enhancements and improvements are needed. CMake is relatively new for the Connective C++ team and enhancement requests are welcome.
109
- Code coverage tools have not been used on the codebase.
1110
- The Doxygen annotation is mostly complete, but additional tutorial content is needed.
1211

test/net_ip/detail/tcp_connector_test.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ void start_stop_connector(asio::io_context& ioc, int interval, chops::net::err_w
128128
auto r1 = conn_ptr->start( no_start_io_state_chg,
129129
chops::net::make_error_func_with_wait_queue<chops::net::tcp_io>(err_wq));
130130
REQUIRE_FALSE(r1);
131-
std::this_thread::sleep_for(std::chrono::milliseconds(interval));
131+
std::this_thread::sleep_for(std::chrono::milliseconds(interval+500)); // at least half second pause
132132
auto r2 = conn_ptr->stop();
133133
REQUIRE_FALSE(r2);
134+
std::this_thread::sleep_for(std::chrono::milliseconds(interval+200)); // pause for part of a sec
134135
auto r3 = conn_ptr->start( no_start_io_state_chg,
135136
chops::net::make_error_func_with_wait_queue<chops::net::tcp_io>(err_wq));
136137
REQUIRE (r3);
@@ -367,8 +368,8 @@ TEST_CASE ( "Tcp connector test, var len msgs, two-way, interval 30, 1 connector
367368
TEST_CASE ( "Tcp connector test, var len msgs, two-way, interval 0, 1 connector, many msgs",
368369
"[tcp_conn] [var_len_msg] [two_way] [interval_0] [connectors_1]" ) {
369370

370-
perform_test ( make_msg_vec (make_variable_len_msg, "Yowser!", 'X', 50*num_msgs),
371-
make_fixed_size_msg_vec(50*num_msgs),
371+
perform_test ( make_msg_vec (make_variable_len_msg, "Yowser!", 'X', 30*num_msgs),
372+
make_fixed_size_msg_vec(30*num_msgs),
372373
true, 0, 1,
373374
std::string_view(), make_empty_variable_len_msg() );
374375

@@ -447,8 +448,8 @@ TEST_CASE ( "Tcp connector test, CR / LF msgs, two-way, interval 10, 5 connector
447448
TEST_CASE ( "Tcp connector test, CR / LF msgs, two-way, interval 0, 10 connectors, many msgs",
448449
"[tcp_conn] [cr_lf_msg] [two_way] [interval_0] [connectors_10] [many]" ) {
449450

450-
perform_test ( make_msg_vec (make_cr_lf_text_msg, "Yes, yes, very fast!", 'F', 50*num_msgs),
451-
make_fixed_size_msg_vec(50*num_msgs),
451+
perform_test ( make_msg_vec (make_cr_lf_text_msg, "Yes, yes, very fast!", 'F', 30*num_msgs),
452+
make_fixed_size_msg_vec(30*num_msgs),
452453
true, 0, 10,
453454
std::string_view("\r\n"), make_empty_cr_lf_text_msg() );
454455

@@ -468,7 +469,7 @@ TEST_CASE ( "Tcp connector test, LF msgs, one-way, interval 0, 15 connectors",
468469
"[tcp_conn] [lf_msg] [one_way] [interval_0] [connectors_15]" ) {
469470

470471
perform_test ( make_msg_vec (make_lf_text_msg, "Excited fast!", 'F', 6*num_msgs),
471-
make_fixed_size_msg_vec(5*num_msgs),
472+
make_fixed_size_msg_vec(6*num_msgs),
472473
false, 0, 15,
473474
std::string_view("\n"), make_empty_lf_text_msg() );
474475

@@ -477,8 +478,8 @@ TEST_CASE ( "Tcp connector test, LF msgs, one-way, interval 0, 15 connectors",
477478
TEST_CASE ( "Tcp connector test, LF msgs, two-way, interval 0, 15 connectors, many msgs",
478479
"[tcp_conn] [lf_msg] [two_way] [interval_0] [connectors_15] [many]" ) {
479480

480-
perform_test ( make_msg_vec (make_lf_text_msg, "Super fast!", 'S', 40*num_msgs),
481-
make_fixed_size_msg_vec(40*num_msgs),
481+
perform_test ( make_msg_vec (make_lf_text_msg, "Super fast!", 'S', 25*num_msgs),
482+
make_fixed_size_msg_vec(25*num_msgs),
482483
true, 0, 15,
483484
std::string_view("\n"), make_empty_lf_text_msg() );
484485

0 commit comments

Comments
 (0)