Skip to content

Is there a way to get a list of available rooms live? #694

Closed Answered by endel
bedryck asked this question in Q&A
Discussion options

You must be logged in to vote

HI @bedryck, that is essentially what the LobbyRoom does :) though, it doesn't use the state - it only sends data as the rooms become available or unavailable. You can take a look at the sources here: https://github.com/colyseus/colyseus/blob/master/packages/core/src/rooms/LobbyRoom.ts

The LobbyRoom uses the (yet undocumented) subscribeLobby method, which is a "global" subscription for when rooms are available/unavailable.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@endel
Comment options

Answer selected by bedryck
@bedryck
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants