Starting a Server Session
In this How-To we'll look at how to start and maintaing a Server Session in Unreal Engine, using the Unreal Server SDK in C++.
Prerequisites
An Unreal Server Project
LootLocker Unreal Server SDK installed and set up in your project.
A Server session is valid for 60 minutes, any subsequent calls to LootLocker will set the time again to 60 minutes. To make sure that our Server always is available, we will call LootLocker every 55 minutes to make sure that we always have a fresh server session token to use.
The code in this How-To is made to be as transparent and clear as possible, not performant, adapt the code to your own Server as needed.
In the above code, we started a server session with LootLocker and set a looping timer to maintain the session every 55 minutes. Now we can be sure that our server always is ready whenever we need to talk with LootLocker.
Conclusion
In this How-to we’ve started a LootLocker Session and made sure that it stays alive as long as our Server is running. Now that you have a LootLocker Server Session, you can start using any of the features available in the Unreal Server SDK. You can use the Unreal Engine Game SDK together with the Unreal Engine Server SDK. Or if you prefer, not allow any interaction from the game client at all. The full LootLocker Server API is now at your disposal to be used for trusted and secure operations from your Game Server.
Last updated