Skip to content

Conversation

@diamondpixel
Copy link
Contributor

Note: This PR is a bit out of scope, but it introduces lobbies support, including Steam Lobbies and several Steam-related
improvements (still a work in progress).

It also adds proper resource cleanup when leaving a lobby and starting a new one, preventing leftover state and leaks.

I have an additional PR prepared that focuses on packet allocation optimization, bringing allocations close to zero. In testing,
this resulted in roughly 600 MB lower memory usage and much more consistent CPU usage.

diamondpixel and others added 19 commits December 16, 2025 17:00
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
updated-dependencies:
- dependency-name: Hamunii.BepInEx.AutoPlugin
  dependency-version: 2.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Add RequiresX capability properties to IEncryptedTransportClient
- Server-side Steam clients now correctly skip UDP sequencing logic
- Lazy-init managers only when needed (saves memory for Steam)
- Remove HolePunch stubs (to be replaced with pre-processors)
…d lobby management system with Steam integration and some improvements to the system
@diamondpixel
Copy link
Contributor Author

By the way i may and may not, have included my Public IP accidentally on the commit.....

Copy link
Owner

@Extremelyd1 Extremelyd1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've finished the review, there are a couple of comments left that I would like to see changed and one somewhat larger question about whether we need to contact an external STUN server.
Apart from that the code looks pretty good. I'll save functional testing until this branch is ready to be merged with main. We need to keep in mind to change the hostname (and maybe port) of the MMS when we do.

Copy link
Owner

@Extremelyd1 Extremelyd1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple instances of Buffer.BlockCopy instead of Array.Copy and a single comment still. I've commited some style, comment, and compiler warning supression fixes already.

/// <typeparam name="T">The type of the generic client packet data.</typeparam>
/// <returns>An instance of the packet data in the packet.</returns>
private T FindOrCreatePacketData<T>(
private T? FindOrCreatePacketData<T>(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this in earlier reviews, but you shouldn't have made the return type nullable here. The method either finds the packet data or creates a new instance of it. So in all cases the method returns a non-null instance of packet data.

@Extremelyd1 Extremelyd1 changed the title HolePunch + General Improvements. Hole punching implementation and improvements to networking including Steam P2P Jan 3, 2026
@Extremelyd1 Extremelyd1 merged commit ff2e8d5 into Extremelyd1:steam-p2p Jan 3, 2026
3 checks passed
@diamondpixel diamondpixel deleted the HolePunch branch January 3, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants