How find session node finds all the session without ip address?

how does unreal search all the session over the network without the help of IP address?
i want to take it to the next level to search all session over the internet but i can’t understand how unreal doing this magic and how can i extend it with it.please help

I don’t know how it works but I can guess:

  • Online Subsystem contains instructions of where to look for lists of servers.
  • If the Online Subsystem is NULL then it will look in the Local Area Network (if the Use LAN checkbox is ticked), i.e. your router, checking who else is connected and showing themselves. If Use LAN is not ticked then it does the simplest thing of all - relies on you already knowing the IP Address in advance.
  • If the Online Subsystem is Steam then it will contact a Steam service using your app ID and that Steam service has already registered all machines and their network addresses who have called Create Session using the Steam Online Subsystem, and respond back to you with that list.
  • When you use the Join Session function, then it takes one of those listings you retrieved from the list you got as response from Find Sessions, and uses further logic in the Online Subsystem to connect you together.

So what I am saying is that I don’t think Unreal knows how to search the internet for game sessions. I think it just knows how to contact specific services (such as steam or your router) to obtain a list of same-ID apps running on the Unreal port(s), and their network addresses, and then assist you in establishing the connection to the one you chose after obtaining that list. Those services create the listings, but Unreal doesn’t know how to spider the internet and go find them.

All of this is wild guessing on my part though, I have never looked at the code to see for sure how it works.
It makes sense to me though.

Back in the 1990s we relied on such services to connect multiplayer games over internet. Services such as Kali and GameSpy would register created sessions and list them for others to join. You could find those games in session because you were using the service that the sessions were created on.

So since I believe that’s how it works, I think what you are trying to do is say “How do I find all the sessions of the game I’ve created, that exist on the internet?” And I think the answer is that you can’t, but you can use or provide a service that your game always uses to create and find sessions on, and make sure your Online Subsystem in Unreal knows how to talk to that service. If all copies of your distributed game use that same service then they will all be able to see each other, in theory, though it makes sense for performance reasons to divide them up by region and give geographically distant regions their own service so the players only find others near them with lower ping.

1 Like