The Session Interface,
IOnlineSession, provides platform-specific functionality for setting up the pieces
behind the scenes that are necessary in order to perform matchmaking as well as other methods of allowing players
to find and join online games. This includes session management, finding sessions though search or other means,
as well as joining and leaving those sessions. The session interface is created and owned by the OnlineSubsystem.
This means it only exists on the server.
There is one session interface class per platform. When adding support for a new platform, a new type of session
interface must be created. Platforms, in this sense, refer to hardware platforms. As such, only one session
interface will ever exist at a time - the session interface for the platform the engine is currently running on.
While the session interface performs all of the session handling, the game doesn't generally interact directly with
it. Instead, the Game Session,
AGameSession, acts as a game-specific wrapper around the session interface
and the game code makes calls to it when it needs to interact with the session. The game session is created and
owned by the game mode,
AGameModeBase, and also only exists on the server when running an online game.
Each game can potentially have multiple game session types, but only one will ever be used at a time. The most common
case for a game having more than one type of game session is to add a type of game session for when the game is
using a dedicated server.