Through Epic Online Services (EOS), players can create, discover, and participate in online game sessions using the Sessions Interface. Sessions range from brief encounters - such as gathering a set number of players before a match begins and closing once it ends — to persistent ones that track ongoing gameplay across multiple maps or rounds. Beyond connecting players, the Sessions Interface handles game-specific data that powers backend search and matchmaking services.
To create a session, you need to call the Create Session (Async) function. This function will create a new session with the given information.
Session Name: A unique identifier for this session, used internally when updating or destroying it.
Is LAN Match: When enabled, the session runs on the local network only and is not advertised to EOS matchmaking services. Useful for playing with friends on the same network without going through the internet.
Allow Invites: When enabled, players in the session can send invites to their friends to join.
Use Presence: When enabled, the session appears in the Epic Games overlay so friends can see and join it directly. Note that only one session per player can use presence at a time.
Max Results: The maximum number of sessions returned by the search. A value of 20 is generally a good default for most use cases.
Num Search Attempts: How many times the node will search for sessions before giving up. If no sessions are found on the first attempt, it automatically retries once per second. A value of 3 is recommended to account for sessions that take a moment to appear in the matchmaking backend.
To join a session, you need to call the Join Session (Async) function. This function will join a session based on the session id that you provided.
Destroy Session: Removes the session from EOS entirely. Call this when the host ends the game. Once destroyed, the session is no longer visible to other players and cannot be joined. All players in the session should travel back to the main menu before or after this is called.
Leave Session: Removes the local player from the session without affecting other players. Call this when a client wants to return to the main menu while the game continues for everyone else. The session stays active on EOS and remains joinable. If the host calls this instead of Destroy Session, the session will be terminated for all
players.