GameServerIp = 0 on Steam

Hi !

I have an issue, i’m creating a session using the “Create Session” node from BP, because of the “bUsepresence” flag, it create a Lobby Session on Steam.

The issue is, when i’m trying to retrieve the IP of this lobby(with the SteamID of the host), it always returns me “0” for the IP and the Port.

Here’s the log when the session is created :

[2017.07.12-14.11.13:910][740]LogOnline:Verbose: STEAM: Lobby Data (OWNINGID, 76561198171238783)
[2017.07.12-14.11.13:911][740]LogOnline:Verbose: STEAM: Lobby Data (OWNINGNAME, Crysux)
[2017.07.12-14.11.13:917][740]LogOnline:Verbose: STEAM: Lobby Data (NUMOPENPRIVCONN, 0)
[2017.07.12-14.11.13:918][740]LogOnline:Verbose: STEAM: Lobby Data (NUMOPENPUBCONN, 99)
[2017.07.12-14.11.13:918][740]LogOnline:Verbose: STEAM: Lobby Data (P2PADDR, 76561198171238783)
[2017.07.12-14.11.13:918][740]LogOnline:Verbose: STEAM: Lobby Data (P2PPORT, 27015)
[2017.07.12-14.11.13:918][740]LogOnline:Verbose: STEAM: Lobby Data (NUMPUBCONN, 100)
[2017.07.12-14.11.13:918][740]LogOnline:Verbose: STEAM: Lobby Data (NUMPRIVCONN, 0)
[2017.07.12-14.11.13:919][740]LogOnline:Verbose: STEAM: Lobby Data (SESSIONFLAGS, 195)
[2017.07.12-14.11.13:919][740]LogOnline:Verbose: STEAM: Lobby Data (BUILDID, 1097606088)
[2017.07.12-14.11.13:929][740]LogOnline:Verbose: dumping NamedSession: 
[2017.07.12-14.11.13:929][740]LogOnline:Verbose: 	SessionName: Game
[2017.07.12-14.11.13:930][740]LogOnline:Verbose: 	HostingPlayerNum: 0
[2017.07.12-14.11.13:931][740]LogOnline:Verbose: 	SessionState: Pending
[2017.07.12-14.11.13:931][740]LogOnline:Verbose: 	RegisteredPlayers: 
[2017.07.12-14.11.13:931][740]LogOnline:Verbose: 	    0 registered players
[2017.07.12-14.11.13:931][740]LogOnline:Verbose: dumping Session: 
[2017.07.12-14.11.13:931][740]LogOnline:Verbose: 	OwningPlayerName: Crysux
[2017.07.12-14.11.13:932][740]LogOnline:Verbose: 	OwningPlayerId: Crysux [0x11000010C93317F]
[2017.07.12-14.11.13:932][740]LogOnline:Verbose: 	NumOpenPrivateConnections: 0
[2017.07.12-14.11.13:932][740]LogOnline:Verbose: 	NumOpenPublicConnections: 99
[2017.07.12-14.11.13:932][740]LogOnline:Verbose: 	SessionInfo: HostIP: INVALID SteamP2P: 76561198171238783:27015 Type: Lobby session SessionId: Lobby [0x1860000C5559B0B]
[2017.07.12-14.11.13:932][740]LogOnline:Verbose: dumping SessionSettings: 
[2017.07.12-14.11.13:933][740]LogOnline:Verbose: 	NumPublicConnections: 100
[2017.07.12-14.11.13:933][740]LogOnline:Verbose: 	NumPrivateConnections: 0
[2017.07.12-14.11.13:933][740]LogOnline:Verbose: 	bIsLanMatch: false
[2017.07.12-14.11.13:933][740]LogOnline:Verbose: 	bIsDedicated: false
[2017.07.12-14.11.13:934][740]LogOnline:Verbose: 	bUsesStats: false
[2017.07.12-14.11.13:934][740]LogOnline:Verbose: 	bShouldAdvertise: true
[2017.07.12-14.11.13:934][740]LogOnline:Verbose: 	bAllowJoinInProgress: true
[2017.07.12-14.11.13:934][740]LogOnline:Verbose: 	bAllowInvites: false
[2017.07.12-14.11.13:934][740]LogOnline:Verbose: 	bUsesPresence: true
[2017.07.12-14.11.13:935][740]LogOnline:Verbose: 	bAllowJoinViaPresence: true
[2017.07.12-14.11.13:935][740]LogOnline:Verbose: 	bAllowJoinViaPresenceFriendsOnly: false
[2017.07.12-14.11.13:935][740]LogOnline:Verbose: 	BuildUniqueId: 0x416c23c8
    [2017.07.12-14.11.13:935][740]LogOnline:Verbose: 	Settings:

And here’s where i get the infos :

bool GameInfosRetrieved = SteamFriends()->GetFriendGamePlayed(FriendID, &GameInfos);
	if (GameInfosRetrieved)
	{
		FriendLobbyID = GameInfos.m_steamIDLobby;
		UE_LOG(LogTemp, Warning, TEXT("LobbyID is : %s"), *FString::FromInt(FriendLobbyID.ConvertToUint64()));
		bool IsSuccess =  SteamMatchmaking()->GetLobbyGameServer(FriendLobbyID, &GameServerIp, &GameServerPort, &ServerID);
		UE_LOG(LogTemp, Warning, TEXT("ServerIP is : %s"), *FString::FromInt(GameServerIp));
		FString command = "open " + FString::FromInt(GameServerIp) + ":" + FString::FromInt(GameServerPort);
		UE_LOG(LogTemp, Warning, TEXT("%s"),*command);
		GetWorld()->Exec(GetWorld(), *command);
	}
}

I also tried to use ISteamNetworking::CreateP2PConnectionSocket but i’m not good enough to understand everything that’s going on there, thanks in advance !

I think if you use Steam sockets, you’re supposed to connect to the “P2PADDR” and “P2PPORT” fields with your connection instead of an IP. Let me know if that doesn’t work.

Well i’m just doing with the Online Interface of Epic, it’s way easier ahah

But i could give a check of what you said, i’m curious about it.
Thank you !