diff --git a/README.md b/README.md index 5b6daf6..1291723 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,41 @@ libsodium (optional). Implemented in C++ (up to C++11 standard), but is available via a C api, which should facilitate creating bindings for other programming languages if needed. -This library is still a work in progress, so api breaking changes may happen -in the future. +~~This library is still a work in progress, so api breaking changes may happen +in the future.~~ +This library is usable. Try testing it out using the `NetworkTest` binary which +is built when Debug builds are enabled (the default) with CMake. + + $ ./NetworkTest + [-c | -s] - client or server (default server) + -ll - listen addr + -lp - listen port + -cl - connection addr (client only) + -clh - connection hostname (client only) + -cp - connection port (client only) + -t + -n - do not add payload to packets + -l (silent|error|warning|info|verbose|debug) - log level, default debug + -e - enable receiving events + -ls - enable libsodium + -ck - add pubkey to whitelist + -sk - start with pub/sec key pair + -p <"fallback" or "strict"> - set auth policy + --hostname - dont run test, just lookup hostname + +A typical test can be done with the following parameters: + +Server: + + ./NetworkTest -s -ll ::1 -lp 9000 -t 50 -e + +Client: + + ./NetworkTest -c -ll ::1 -lp 9001 -cl ::1 -cp 9000 -t 40 -e + +`NetworkTest` gracefully shuts down on SIGINT (Ctrl-C). + +The source of `NetworkTest` can be found in `src/test/UDPC_NetworkTest.c`. ## Documentation