<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to access to main from room]]></title><description><![CDATA[<p>im doing lobby /Room/ and want to supply with other rooms data, how to access to other rooms and main.</p>
]]></description><link>http://discuss.colyseus.io/topic/24/how-to-access-to-main-from-room</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 09:12:02 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/24.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Jan 2018 10:32:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to access to main from room on Invalid Date]]></title><description><![CDATA[<p>im doing lobby /Room/ and want to supply with other rooms data, how to access to other rooms and main.</p>
]]></description><link>http://discuss.colyseus.io/post/54</link><guid isPermaLink="true">http://discuss.colyseus.io/post/54</guid><dc:creator><![CDATA[Burjee Bataa]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to How to access to main from room on Fri, 19 Jan 2018 16:18:44 GMT]]></title><description><![CDATA[<p>Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/19">@Burjee-Bataa</a>,</p>
<p>If you're using <a href="https://github.com/gamestdio/colyseus/blob/master/src/Server.ts" rel="nofollow"><code>Server</code></a> (single-process) you can take a look on how it's being done here: <a href="https://github.com/derwish-pro/colyseus-monitor?files=1" rel="nofollow">https://github.com/derwish-pro/colyseus-monitor?files=1</a></p>
<p>For <a href="https://github.com/gamestdio/colyseus/blob/master/src/ClusterServer.ts" rel="nofollow"><code>ClusterServer</code></a> it's more complicated. Each process have it's own instance of the <a href="https://github.com/gamestdio/colyseus/blob/master/src/MatchMaker.ts" rel="nofollow"><code>MatchMaker</code></a> class. The master node access a limited amount of data (via <a href="https://github.com/gamestdio/colyseus/blob/edd74f036f889d1bcb192e6ffd9bc2fac86dab15/src/MatchMaker.ts#L292" rel="nofollow">memshared</a>, search for &quot;memshared&quot; on this file, you'll see what's available) just to be able to forward connections to the right process.</p>
<p>One suggestion when using <code>ClusterServer</code> is to keep track of your spawned rooms through the public events (<a href="https://github.com/gamestdio/colyseus/wiki/Room-handlers#listening-to-room-events-outside-the-room-scope" rel="nofollow">https://github.com/gamestdio/colyseus/wiki/Room-handlers#listening-to-room-events-outside-the-room-scope</a>), and consume the data as you need.</p>
<p>Cheers!</p>
]]></description><link>http://discuss.colyseus.io/post/55</link><guid isPermaLink="true">http://discuss.colyseus.io/post/55</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Fri, 19 Jan 2018 16:18:44 GMT</pubDate></item><item><title><![CDATA[Reply to How to access to main from room on Invalid Date]]></title><description><![CDATA[<p>tnx, monitor nice one!</p>
]]></description><link>http://discuss.colyseus.io/post/56</link><guid isPermaLink="true">http://discuss.colyseus.io/post/56</guid><dc:creator><![CDATA[Burjee Bataa]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to How to access to main from room on Invalid Date]]></title><description><![CDATA[<p>another question, how to leave room from client side?</p>
]]></description><link>http://discuss.colyseus.io/post/57</link><guid isPermaLink="true">http://discuss.colyseus.io/post/57</guid><dc:creator><![CDATA[Burjee Bataa]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to How to access to main from room on Fri, 19 Jan 2018 10:59:58 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/19">@Burjee-Bataa</a> this should do:</p>
<pre><code class="language-javascript">var room = client.join(&quot;room_name&quot;);
// ...
room.leave();
</code></pre>
]]></description><link>http://discuss.colyseus.io/post/58</link><guid isPermaLink="true">http://discuss.colyseus.io/post/58</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Fri, 19 Jan 2018 10:59:58 GMT</pubDate></item></channel></rss>