]> git.corax.cc Git - toolbox/commit
include/ipc: Add "topic" field to pubsub IPC messages
authorMatthias Kruk <m@m10k.eu>
Sat, 17 Sep 2022 05:22:07 +0000 (14:22 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 17 Sep 2022 05:38:10 +0000 (14:38 +0900)
commitc70a0a93374eae11f20b90aec539b0c190eb6faa
treee71bd14ba06052ce6d1a8a5eef50462cf7d25f57
parentbdebeda420db3e2ccccaa388120ce593accdbbc1
include/ipc: Add "topic" field to pubsub IPC messages

Messages that were sent with ipc_endpoint_publish() don't contain
information about the topic that they were published on, making it
impossible for the receiver to determine what topic a message was
published on if they are subscribed to more than one topic.

This commit adds a new field "topic" to IPC messages and modifies
ipc_endpoint_publish() so that it sets the field appropriately. This
further adds the function ipc_msg_get_topic() that may be used to
determine the topic an IPC message was published on.
include/ipc.sh
spec/ipc_message.schema.json