]> git.corax.cc Git - toolbox/commit
utils: Implement hooks in ipc-tap and ipc-inject
authorMatthias Kruk <m@m10k.eu>
Sat, 1 Oct 2022 12:47:33 +0000 (21:47 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 1 Oct 2022 12:47:33 +0000 (21:47 +0900)
commit2ded12a09d33fcf5aefe813a7da57298c60b39b5
tree6cbe2a28049117d749d93f1be764b0192b5d2df9
parent4a98bc288f1e82c057fd9fdd8f92367c66e062e3
utils: Implement hooks in ipc-tap and ipc-inject

To correctly forward foundry messages using ipc-tap and ipc-inject,
it is necessary to move data that is usually not transferred over
IPC messages. In order to transfer this data over ipc-tap and
ipc-inject, hooks are necessary that allow user-data to be generated
on the ipc-tap side and consumed on the ipc-inject side.

This commit implements a simple mechanism that allows the user to
specify hooks that are called by ipc-tap whenever a message on a
user-defined topic is encountered. The hook can then inject
messages into ipc-tap's data stream. On the ipc-inject side, the
user may define hooks that are called when a user-message with a
application-defined tag is encountered, allowing the injected
message to be handled on the ipc-inject side.
utils/ipc-inject.sh
utils/ipc-tap.sh