Dedicated and client using IPNetDrivernt

Hi.
The dedicated server wants to use IPNetDriver.
Client wants to use SteamNetDriver.

Note site: Online Subsystem Steam | Unreal Engine Documentation

I set it manually because it is Unreal 4.21.
4.22 By analyzing the code, the parts using bUseSteamNetworking were found and applied to my project.

(Modified part)
Dedicated server, Client all set SSS.RegisterSocketSubsystem (STEAM_SUBSYSTEM, SocketSubsystem, false);

If NetDriver connects to a different state and moves the map, the connection is forcibly disconnected.

server wants to use IPNetDriver because it thinks multi platform (xbox, ps4 etc) without using steam feature.

Onlinesubsystem - Do not use session.
because…

  1. The currently implemented dedicated server is not using session.
  2. Of the steam function, only the part that can be used without session is being used by the client.

modified client.
Dedicated server, Client all set SSS.RegisterSocketSubsystem (STEAM_SUBSYSTEM, SocketSubsystem, false);

When executed, the client is connected to the steam (overlay).
I think the client will use SteamNetDriver even if I modify the code.

How can I use both IPNetDriver?
Can not IPNetDriver face client use steam function?
4.22 There is no example and documentation is too insufficient.

What should I do?
I have suffered for four months with this problem.

Remove the

+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

line from your DefaultEngine.ini, that you added. That line instructs your client to use the Steam P2P Network Driver instead of the more basic IP Net Driver. You do not get automatic NAT punching with the IP Net Driver.

Hi.
If you delete it, the steam client can not connect to the dedicate server.
A non-steam client connects to the dedicate server.
Because … same IPNetdriver allows connection.

Another solution (site)

(Contents)
I’ve commented out the engine source code (for dedicated server) / check (GetType () == TYPE); / in OnlineSubsystemTypes.h and it worked for me

I solved it by the above method, but I do not know whether this is the right way.

What should I do?

1 Like