I wanted to folllow-up on [SteamSockets fails to create listen socket on [Content removed] this UDN post for anyone who may find this useful.
I ended up doing some semi-hackery and am reusing the underlying FSteamSockets in the SteamSocketSubsystem. Basically we intercept the mark for deletion and add a couple global delegates that the engine broadcasts (which the SteamSockets plugin listens to). We look at the travel information to decide if we should try to reuse the socket. If we do, we setup some structures and some other modifications.
USteamSocketsNetDriver has some significant (but relatively straight-forward) modifications to find the reuseable FSteamSocket instead of going through the regular InitListen / InitConnect flows, pretty simple pattern we just stop creating new socket and grab the cached one.
We also recreate the UNetConnection on the server for the client during InitListen because the p2p message handler will not come through with any connection state changes (sockets are open and ready!) which is how these were established previously.
I’m going to post a fork on github if anyone is interested in this change. Wanted to get this out to community though in case other people don’t want to go back to OG steam sockets and use the new stuff. I guess in hindsight going backwards would’ve been easier, but this certainly was a fun challenge and so far testing is working out well. You do need a custom engine build.
[Attachment Removed]