So i’ve made some progress on this. its going to require a bit more setup than most connections, however, since you really need some way to get the connections in the first place. Steam P2P works using their SteamID system which makes it a little more complicated. You basically need some sort of Steam App State that handles a lot of the queries and things you need to make it work.
They also technically have 3 different connections systems that all function a little differently (IE Lobbies, Servers, and join from friends). I’m trying to keep this as decoupled as possible so I can eventually extract it into its own lib.
So far I’ve got a dedicated server running that interfaces with the steam master server list and I have the initial handshaking between the client and server running. There is still some weirdness with the connection process that I haven’t figured out yet. Like when you first attempt to connect Spidermonkey sends 2 packets (25 and 18 bytes) and usually only the first one is received and the connection times out. Then if you attempt to connect again it sees both and starts connecting. So, I still have a lot to figure out, but i’ve made good progress.