From node B adding files to IPFS, I would like to transmit order to node A to pin it.
I am trying to use pubsub in order to do that.
- NODE A is listening to CHANNEL, waiting for new PIN event: ipfs pubsub sub CHANNEL
- NODE B after adding new file : ipfs pubsub pub CHANNEL PIN:QmNew_CID
My NODE A is receiving string, but I need a mean to interpret it…
I am using ipfs pubsub sub CHANNEL | while read -r -n 50 line
but every message must have the same length… Any bad communication will break it
Is there a way to send NewLine in pubsub?
If not, how could I split received messages another way?