Where is the repository? Is it even open source?
Why do you roll your own? You could build on existing layers and concentrate on your custom protocol/payload.
Take a look at https://bridgefy.me/sdk/
Discussion
You're right, sorry. I was under the impression that their SDK was free to use, but obviously it's a subscription model.
There's something similar from university of Rome, maybe this helps with your implementation:
This is more ingesting thank you! 😄 it is actually using the same native library I do underneath, great examples