WarningThe Steam transport is only intended for use during development and is not meant as a production-ready solution for listen servers.
Although SnapNet is primarily designed for use with dedicated servers, it is often helpful during development to host and join matches directly between peers where connectivity can be tricky due to firewalls and network address translation. The Steam transport provides a way to leverage Steam’s networking API and their datagram relay to provide connectivity and security.
NoteThe Steam transport is only available within the SnapNet Unreal Engine SDK at this time
To use the Steam transport, set the transport class for both the server and client to USnapNetSteamTransport. You can set it as the default transport in the editor via Edit → Project Settings → SnapNet → Common → Default Transport Class. This can also be accomplished for a single session via C++ as follows:
SnapNetSubsystem->GetServer()->SetTransportClass( USnapNetSteamTransport::StaticClass() ); SnapNetSubsystem->GetClient()->SetTransportClass( USnapNetSteamTransport::StaticClass() );
To connect to a specific Steam ID and virtual port combination you can specify it as a url in the format SteamID:VirtualPort. For example:
Client->GetTransport()->SetupClientByUrl( TEXT( "76561191234567890:7632" ) );