Global process


I am currently exploring the possibility of migrating an existing browser based MMORPG platform I work on into using Phaser 3.

Within the game there are two different styles of play. One when the player is outside, and when the player is inside a building. Both of which operate and look different. I have determined that within Phaser I guess these two styles would each be Scenes?

One thing I am not sure of however is where I can put in my global processes. When on the logon screen (which is I am guessing also a scene) the client needs to connect to the socket io server, and maintain that connection (not closing it as scenes change). Aswell as this I have a inbound message queue processing which I need to work all the time regardless of what scene the user is in, which will update the model - from which the player positions and state will be updated from.

Is there some kind of global process I can use within Phaser 3? I have seen that within scenes there is an update method which runs constantly but I need something similar on a global level to invoke my server message processor.

Many thanks