Online Subsystem Session Search Always Empty

anonymous_user_037c12af
Thu, 09 Oct 2014 10:38:12 +0000
Platform & Builds

I’m trying to set up a game browser using the steam online subsystem and I’m running into problems. Whenever I run a session search the result set is always completely empty.

Here is my code for creating sessions:

 if (OnlineSystem)
	{
		FOnlineSessionSettings CurrentSettings;
		CurrentSettings.bIsLANMatch = false;
		CurrentSettings.bIsDedicated = false;
		CurrentSettings.bAllowJoinInProgress = true;
		CurrentSettings.bAllowInvites = true;
		CurrentSettings.bShouldAdvertise = true;
		CurrentSettings.bUsesPresence = true;
		CurrentSettings.NumPrivateConnections = 100;
		CurrentSettings.NumPublicConnections = 100;


		CurrentSettings.bUsesStats = true;
		IOnlineSessionPtr Session = OnlineSystem->GetSessionInterface();
		if (Session.IsValid())
		{

			Session->AddOnCreateSessionCompleteDelegate(OnCreateSessionCompleteDelegate);
			return Session->CreateSession(1, serverName, CurrentSettings);
		}
	}

	return false;

Here is my code for searching sessions:

if (OnlineSystem)
	{
		IOnlineSessionPtr Session = OnlineSystem->GetSessionInterface();
		if (Session.IsValid())
		{
			SearchSettings = MakeShareable(new FOnlineSessionSearch());
			SearchSettings->bIsLanQuery = false;
			SearchSettings->MaxSearchResults = 100;
			SearchSettings->PingBucketSize = 200;
			TSharedRef<FOnlineSessionSearch> SearchSettingsRef = SearchSettings.ToSharedRef();
			Session->AddOnFindSessionsCompleteDelegate(OnFindSessionCompleteDelegate);
			return Session->FindSessions(0, SearchSettingsRef);
		}
	}
	return false;

Any help would be appreciated. I can provide run-time logs if that would help

13 posts - 10 participants