Steam Transport
Warning
The 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.
Usage
Note
The Steam transport is only available within the SnapNet Unreal Engine SDK at this timeTo 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( ISnapNetSteamInterface::GetSteamTransportClass() );
SnapNetSubsystem->GetClient()->SetTransportClass( ISnapNetSteamInterface::GetSteamTransportClass() );
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" ) );