Skip to content

[Feature Request] Room Size Limit #141

@jamsinclair

Description

@jamsinclair

Firstly, thanks for the awesome project. I was prototyping away on a room based peer.js wrapper, until I found your great project via HackerNews!

Has anyone raised an issue or discussion around limiting peers in a room? I did a quick search in the issues and discussions but couldn't find anything.

For my use case specifically, I want to limit the number of players in a room for a video game. This would be easy with a Host/Client based setup where every peer connects to one "host". However, I believe in trystero, every peer connects to each other.

Is there an established pattern for limiting a room to a given size and rejecting all later connections automatically? Thinking aloud, I guess in my app the first peer to join the room could be responsible for tracking the room size and allowed connections. Then broadcast to other peers an allowList of connections. Would be nice if this could somehow be abstracted away into this library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions