]> git.corax.cc Git - toolbox/commitdiff
README: Use uipc in PubSub example instead of ipc
authorMatthias Kruk <m@m10k.eu>
Sun, 9 Oct 2022 03:41:17 +0000 (12:41 +0900)
committerMatthias Kruk <m@m10k.eu>
Sun, 9 Oct 2022 03:46:31 +0000 (12:46 +0900)
The readme uses the ipc module to explain how to implement simple
pubsub-based messaging using toolbox. However, the ipc module is
somewhat awkward to configure because it uses GPG and requires the
user to generate unencrypted keys.

This commit modifies the readme to introduce the uipc module instead
of the ipc module, since the former is easier to set up.

README.md

index adc3d488c41e38c748412adb94d277bc07ee3392..6510cdbf254d803903cba281ecf7d2dbf4a8fe67 100644 (file)
--- a/README.md
+++ b/README.md
@@ -19,24 +19,24 @@ that ship with toolbox, or create your own ones.
 
 All you have to do is source *toolbox.sh* and you can start using
 the `include()` function. For example, the following code is a
-minimal publisher using the *ipc* module.
+minimal publisher using the *uipc* module.
 
     . toolbox.sh
-    include "ipc"
+    include "uipc"
 
-    endp=$(ipc_endpoint_open)
-    ipc_endpoint_publish "$endp" "mytopic" "Hello world"
+    endp=$(uipc_endpoint_open)
+    uipc_endpoint_publish "$endp" "mytopic" "Hello world"
 
 And this is the corresponding subscriber.
 
     . toolbox.sh
-    include "ipc"
+    include "uipc"
 
-    endp=$(ipc_endpoint_open)
-    ipc_endpoint_subscribe "$endp" "mytopic"
+    endp=$(uipc_endpoint_open)
+    uipc_endpoint_subscribe "$endp" "mytopic"
 
-    if msg=$(ipc_endpoint_recv "$endp"); then
-       data=$(ipc_msg_get_data "$msg")
+    if msg=$(uipc_endpoint_recv "$endp"); then
+       data=$(uipc_msg_get_data "$msg")
 
        echo "Received message: $data"
     fi
@@ -54,7 +54,7 @@ used for.
 | conf   | Configuration handling |
 | git    | Interacting with git repositories |
 | inst   | Writing daemons |
-| ipc    | Message-based IPC |
+| ipc    | Message-based IPC (GPG-signed messages) |
 | is     | Checking the value of variables |
 | json   | Handling JSON data |
 | log    | Logging and debugging |
@@ -62,6 +62,7 @@ used for.
 | opt    | Command line parsing |
 | queue  | "Thread"-safe FIFOs |
 | sem    | Process synchronization (similar to POSIX semaphores) |
+| uipc   | Message-based IPC (unsigned messages) |
 | wmutex | Weak (owner-less) locks |