Well, I don’t know if this is related to my previous post but somehow I cannot create or join server from c++ code.
I could use ?listen/ip address on the UT4’s shortcut to create/join the server, but I couldn’t do the same with c++ ServerTravel and ClientTravel even with absolute ip.
Yes, . I have all those gameSession, gameMode, delegates and host functions… I’m trying to follow shooter demo as much as I could.
On a closer debuging, I noticed that when I call ServerTravel inside my project, there’s no logs notifying that my game socket is being queued like when I open it with command line (or shooter demo).
In other word, I’m missing this from my log:
LogInit: WinSock: Socket queue 131072 / 131072
[2014.05.27-09.55.53:198] 0]LogNet: GameNetDriver IpNetDriver_0 IpNetDriver listening on port 7777
So where/how the heck do I invoke this WinSocket. I’m as close as shifting from IOnlineSubsystem to pure WinSocket now…
You say you “have it all” but it is in that lot of code that the critical part needs to happen, so log it up till you see where the chain of events is not occurring
I digged deep and found that log on “Socket queue” is inside UIpNetDriver::InitBase(). But I couldn’t find where does IOnlineSubsystem invoke such class…
ps. Just found another clue on my log, it said:
LogOnline:Warning: Unable to load default OnlineSubsystem module Steam, using NULL interface
Well, I changed from Steam to OnlineSubsystemNull just for faster prototype.
I kinda understand now that unlike shooter entry, my game doesn’t start out with any listening port.
I don’t get how they start that process in the shooter demo though… (I.E. How do I make my .exe start with ?listen at the end.)
Yes, if you have access to the Steam SDK ShooterGame should work over Steam.
Yes, it definitely should. Calling ClientTravel directly will bypass the OnlineSubsystem stuff. After you call ServerTravel, on the other instance does the console command “open 127.0.0.1” connect to the server successfully?
Nope, I could not use console command to connect to the any game that was create with c++ serverTravel(map?Listen).
GetNetMode() always say that my game is a standalone too, not a listen server. Starting ut4 with ?Listen] in command line does make everything work nicely though, the game start out as a listen server. But the point is to make my game turn into a listen server only after a host button is pressed…
ps. Oh gosh, I just found out that Shooter’s EntryLevel always start out as a listening server. How do you do that?
For now I have to use this as a work around. Basically if a game front isn’t a listen server then immediately reopen it with ?listen. I hope someone can show me a better light though…
Seriously, when is the network document going to come? I read somewhere that Epic is going to try to keep a close watch on networking questions until its release, but so far I don’t see much help on this topic…
Hi,
We’ve run into this exact problem. We are following the ShooterGame code but trying to create a joinable session when the Lobby UI comes up - without travelling to a new map using the “?listen” URL.
The missing step seems to be that the **GameNetDriver **is not being created. Normally this happens in UWorld::Listen.
Did you find a cleaner workaround for this puzzle?