Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-join on socket.connect() #38

Open
phisad opened this issue Jan 24, 2022 · 0 comments
Open

Auto-join on socket.connect() #38

phisad opened this issue Jan 24, 2022 · 0 comments
Labels
prio:low type:feature New feature or request

Comments

@phisad
Copy link
Collaborator

phisad commented Jan 24, 2022

For single-player games it might be interesting to also provide an "auto-join" option.

Currently we need this:

socket.connect();
socket.emit("join", {"room_id": "compreg_room"});

Maybe something like this might be enough

socket.connect({"autojoin":"default_room"});

with server-side:

@socketio.on("connect")
def client_connect(auth, data):
    if "autojoin" in data:
       socketio.emit("join", {"room_id": data["autojoin"]});

If sufficient in most cases, this might become the default behavior.

@phisad phisad added type:feature New feature or request prio:low labels Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio:low type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant