You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-14Lines changed: 21 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,13 @@ Chops Net IP is not like any other high-level, general purpose C++ socket librar
6
6
7
7
Chops Net IP is layered on top of the Asio asynchronous networking library, taking advantage of the portability and functionality that Asio provides. However, it simplifies network programming compared to coding against the Asio API, while providing easy scalability through the asynchronous facilities.
8
8
9
+
Chops Net IP:
10
+
11
+
1. Asio gotchas
12
+
2. Simplifies many use cases
13
+
3. API between TCP and UDP is similar, allowing shared code
14
+
4. Provides callback points
15
+
9
16
#### Unit Test and Documentation Generation Workflow Status
@@ -18,42 +25,42 @@ Chops Net IP is layered on top of the Asio asynchronous networking library, taki
18
25
19
26
## Overview
20
27
21
-
`periodic_timer` is an asynchronous periodic timer that wraps and simplifies Asio timers when periodic callbacks are needed. The periodicity can be based on either a simple duration or on timepoints based on a duration.
22
-
23
-
Timepoint calculations are performed by this class template so that timepoint durations don't "drift". In other words, if the processing during a callback takes 15 milliseconds, the next callback invocation is adjusted accordingly.
24
-
25
-
Asynchronous timers from Asio are relatively easy to use. However, there are no timers that are periodic. This class simplifies the usage, using application supplied function object callbacks. When the timer is started, the application specifies whether each callback is invoked based on a duration (e.g. one second after the last callback), or on timepoints (e.g. a callback will be invoked each second according to the clock).
28
+
(fill in)
26
29
27
30
## Generated Documentation
28
31
29
-
The generated Doxygen documentation for `periodic_timer` is [here](https://connectivecpp.github.io/chops-net-ip/).
32
+
The generated Doxygen documentation for `chops_net_ip` is [here](https://connectivecpp.github.io/chops-net-ip/).
30
33
31
34
## Dependencies
32
35
33
-
The `periodic_timer` header file has the stand-alone Asio library for a dependency. Specific version (or branch) specs for the Asio dependency is in `cmake/download_asio_cpm.cmake`.
36
+
The stand-alone Asio library is a dependency for Chops Net IP. Specific version (or branch) specs for the Asio dependency is in `cmake/download_asio_cpm.cmake`.
37
+
38
+
The `shared_buffer` library from Connective C++ is a dependency, providing reference counted `std::byte` buffers.
39
+
40
+
`expected_lite` from Martin Moene is a dependency, providing `std::expected` functionality for C++ 20 code baselines. If Chops Net IP transitions to a C++ 23 baseline, `expected_lite` will be replaced with `std::expected`.
34
41
35
42
## C++ Standard
36
43
37
-
`periodic_timer` is built under C++ 20, but (currently) does not use any specific C++ 20 features. In the future `concepts` / `requires` will be added.
44
+
`chops_net_ip` is built under C++ 20, using features such as `std::span`. In the future `concepts` / `requires` will be added.
38
45
39
46
## Supported Compilers
40
47
41
48
Continuous integration workflows build and unit test on g++ (through Ubuntu), MSVC (through Windows), and clang (through macOS).
42
49
43
50
## Unit Test Dependencies
44
51
45
-
The unit test code uses [Catch2](https://github.com/catchorg/Catch2). If the `PERIODIC_TIMER_BUILD_TESTS` flag is provided to Cmake (see commands below) the Cmake configure / generate will download the Catch2 library as appropriate using the [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) dependency manager. If Catch2 (v3 or greater) is already installed using a different package manager (such as Conan or vcpkg), the `CPM_USE_LOCAL_PACKAGES` variable can be set which results in `find_package` being attempted. Note that v3 (or later) of Catch2 is required.
52
+
The unit test code uses [Catch2](https://github.com/catchorg/Catch2). If the `CHOPS_NET_IP_BUILD_TESTS` flag is provided to Cmake (see commands below) the Cmake configure / generate will download the Catch2 library as appropriate using the [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) dependency manager. If Catch2 (v3 or greater) is already installed using a different package manager (such as Conan or vcpkg), the `CPM_USE_LOCAL_PACKAGES` variable can be set which results in `find_package` being attempted. Note that v3 (or later) of Catch2 is required.
46
53
47
54
Specific version (or branch) specs for the Catch2 dependency is in the [test/CMakeLists.txt](test/CMakeLists.txt) file, look for the `CPMAddPackage` command.
48
55
49
56
## Build and Run Unit Tests
50
57
51
-
To build and run the unit test program:
58
+
To build and run the unit test programs:
52
59
53
-
First clone the `periodic-timer` repository, then create a build directory in parallel to the `periodic-timer` directory (this is called "out of source" builds, which is recommended), then `cd` (change directory) into the build directory. The CMake commands:
60
+
First clone the `chops-net-ip` repository, then create a build directory in parallel to the `chops-net-ip` directory (this is called "out of source" builds, which is recommended), then `cd` (change directory) into the build directory. The CMake commands:
0 commit comments