Multiple Realtime Clients?


I’m having some difficulty wrapping my head around realtime clients and how they are different from the default client. I have a number of questions.

I read that “The client can create one or more realtime clients with the server.”
Why would I ever need more than one?

Also, each rtClient can have it’s own CreateStatus, which determines whether the user will be shown as online to others. If I have multiple realtime clients running simultaneously, will the user be shown as online multiple times? Does this mean each rtClient create it’s own presence?

If I have multiple rtClients running simultaneously, is it important for each one to use it’s own port? Will this create problems with the client user’s firewall?

I think all of this matters for when I try to figure out when to initialize rtClients in my program. Should I start an rtClient immediately upon authentication? Or should I wait to start the rtClient until the user creates or joins a match? If I wait, then the user doesn’t have an online status until they create/join a match, which doesn’t seem right. So does that mean I should start an rtClient immediately on authentication to handle the social functions, and start another rtClient when the user creates/joins a match?

I really appreciate any input here. It will help me understand how best to proceed in my work. Thanks!

Hey @Mehoo462 I think the vast majority of games will only need one realtime client per device.

We support multiple essentially because there’s no reason not to. It’s useful internally for running tests with different mock users. Another production use case that comes to mind is running a headless server where you may want to batch your server simulation across a certain pool of users communicating over a socket.

If you aren’t sure why we would support it, you probably don’t need to for your game :slight_smile:

1 Like

Thanks for the reply! I’m so excited by how valuable this forum has been.