Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to check if room exists/valid#1412

Unanswered
Mathiaszero asked this question inQ&A
Discussion options

I made function to get rooms from default namespace when 2 clients are connected usingitems = sio.manager.rooms['/'].items(), however it shows this:
image

It shows a mix of a none type, both clients (Jz and iB), and the room (sub_...) as the keys, which will be an issue for me. Is there something likeRoomExists(room) that can return true or false if it is valid room or not?

You must be logged in to vote

Replies: 1 comment

Comment options

You can do a lot of things if you access the internal data structures that this package maintains, but this isn't supported and is likely to break in future releases as this package evolves. These structures just exist to support the public interfaces of the package, which is what you should use instead.

The design for rooms is that they are implicitly created and destroyed as needed, if really doesn't make sense to create a room or to check if a room exists. If you need to know what rooms are available, then you should track these rooms in your own application.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@Mathiaszero@miguelgrinberg

[8]ページ先頭

©2009-2025 Movatter.jp