Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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 !

Product Version: UE 4.14
more ▼

asked Jul 12 '17 at 02:45 PM in C++ Programming

avatar image

50 2 5 10

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Jul 16 '17 at 12:47 AM

avatar image

460 8 3 14

(comments are locked)
10|2000 characters needed characters left

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 !

more ▼

answered Jul 17 '17 at 02:11 PM

avatar image

50 2 5 10

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question