Problem is, when I’m running my game with Steam integration, it uses the FSocketSubsystemSteam implementation, which doesn’t have this implemented and returns only SE_EADDRNOTAVAIL? Is there a reason for this or am I screwed? Can I just copy the implementation from elsewhere?
You’ll want to use the PLATFORM_SOCKETSUBSYSTEM macro in your Get() call to tell the system to use the platform default instead of the OnlineSubsystem default.
Your call should look like this: ResolveInfo = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->GetHostByName("irc.twitch.tv");
Hey! That sounds exactly like what I need, but somehow it still doesn’t work and still uses the Steam implementation. Currently debugging this - calling GetSocketAPIName() on the socket subsystem I get with ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM) returns “WinSock”, which sounds right. But in the end it jumps into the Steam implementation (put a log there). I feel like I’m missing something…
So FResolveInfoAsync::DoWork() calls ISocketSubsystem::Get() without the parameter and afterwards calls GetHostByName from the Steam subsystem. Can’t I somehow set the Windows subsystem as the default one, instead of the Steam one?
Looks to me like FResolveInfoAsync::DoWork() is intended to call into your own subsystem, at which point you can redirect to the PLATFORM_SOCKETSUBSYSTEM for example. I don’t think you’ll be able to use it out of the box with the steam subsystem for the reasons you describe.
edit: I wonder if this has been fixed in the steam socket subsystem since 2016. In UE 4.25 SocketSubsystemSteam::GetAddressInfo will fall back to PLATFORM_SOCKETSUBSYSTEM if the address doesn’t look like a steam ID.