Cannot create/connect server with c++ code.

No any other help on this subject? T_T

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

Could this be the core of the problem?


I forgot to mention

you need a special config setup and also build cs!

you should copy over the shootergame build cs, the parts related to steam, and also check out the config file!

I use something like this (defaultengine.ini)

LogOnline=verbose ;online logging





Yes, I have that. cry

I think it’s more about unable to load Steam module… any clue on that?

do you have steam already loaded and running in the background when you try to play your game?


Oh gosh, so shooter demo actually use a real steam API? I thought it was just a mocked up version.

Ok going to set up my steam sdk. now…


ps. But wait, when I tested out the Shooter demo, there’s no “steam already loaded and running in the background” though. How does that work?

I am not sure how steam integration works at the moment, it has changed since the Beta, hopefully someone from Epic can take this further!


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.)

Ok, I think my ultimate question here is, What c++ code do I use to switch my game into a server and client?

Does serverTravel(’‘Map?Listen’’) automatically open a new listen server?

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” 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 here 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…

void AFrontGui::BeginPlay()
	if (GetNetMode() != NM_ListenServer)

This only works in 64Bit debug mode too. The client fail to join sessions which are created from 32B shipping built…

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…

Very frustrated atm…

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?

Well we kinda found a way to do this. I believe the problem was that the network interface doesn’t let you do this with ‘play in editor’.

Hope this help. Otherwise, I’ll go dig some codes for you when our office open next week. Have a happy ny. :slight_smile:

Hey since its not mentioned in this thread i just tought i add it.
In 4.6 they added “Unreal now supports hosting, discovering and joining online and LAN sessions through Blueprint scripting!”
If you want the functonality with Host and discovery i belive its allready here. :slight_smile:

Hope it helps

9 months later and I haven’t seen any new info/documentation. Sucks.

Documentation for others who might stumble onto this post

That says it is only for 4.7 …