It’s unfortunate that for browser based multiplayer gaming it’s not feasible to use something like WebRTC and we must stick to TCP based connections.
https://github.com/nathhB/nbnet
In fact, I am on the hunt for a minimal C library to do exactly this for a hobby project and nbnet is the best candidate I have found so far. The only drawback so far is that I would love to have voice support and nbnet (rightfully so to keep it simple) does not provide it and I would have to roll it on my own.
And the second part of it is - I'm sure its easily done but at this point there is some incentive to keep whatever implementation you have to yourself.
Or maybe I missed something and I should try looking into it again.