Send a message from peer to peer without subscription?

Hello, I’m working on a bachelor thesis and need to find a way to send messages from A to B. I looked at the ping and chat examples but neither of them really fit.
The ping example doesn’t provide a way for me to actually send a message, it just dials the peer. The chat example uses gossipsub which I can’t use as this is implemented externally. So what function would I use for this?

Hope someone can help me, thanks a lot in advance.