However, both options seem to work with IPv4 only and without Ports. But I’m not 100% sure about the port part, because I’m not sure I’m using the correct port. Which leads me to my second question. I’m using CreateSession of the default online subsystem to create a host. But I don’t see any way to know which port the server is using. (Create Session | Unreal Engine Documentation). Right now I try the port which is also used for the communication with the matchmaking server, because I know it’s resolving to the correct client (NAT) and application, but seems like the online subsystem is listening on a different port.
For now all clients and servers are in the same subnet, to prevent any problem with NAT.
Tried that, didn’t work, probably because it was the wrong port. Still need to know how to get the port used by the session. And it also doesn’t work with IPv6.
I get the port in line 40, but first you need the socket, 32, but for that you need the ipnetdriver (20) and for that you need the netdriver (16) and for that you need the onlinesubsystem (5).
Also I tried to get the port in 14 “getportfromnetdriver” but if I remember correctly that’s just the preferred port for that netdriver and that instancename, so it’s not guaranteed to be that port (but maybe it was, I can’t remember).