Merge pull request #255 from FromZeus/master

Add ServersConnected and ServerConnectFailure callbacks to SteamServer
This commit is contained in:
Garry Newman 2019-05-17 09:10:02 +01:00 committed by GitHub
commit 7c53fc580d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,8 @@ internal static ISteamGameServer Internal
internal static void InstallEvents()
{
ValidateAuthTicketResponse_t.Install( x => OnValidateAuthTicketResponse?.Invoke( x.SteamID, x.OwnerSteamID, x.AuthSessionResponse ), true );
SteamServersConnected_t.Install( x => OnSteamServersConnected?.Invoke(), true );
SteamServerConnectFailure_t.Install( x => OnSteamServerConnectFailure?.Invoke(), true );
}
/// <summary>
@ -45,6 +46,17 @@ internal static void InstallEvents()
/// </summary>
public static event Action<SteamId, SteamId, AuthResponse> OnValidateAuthTicketResponse;
/// <summary>
/// Called when a connections to the Steam back-end has been established.
/// This means the server now is logged on and has a working connection to the Steam master server.
/// </summary>
public static event Action OnSteamServersConnected;
/// <summary>
/// Called when a connection attempt has failed.
/// </summary>
public static event Action OnSteamServerConnectFailure;
public static void Init( AppId appid, SteamServerInit init )
{
uint ipaddress = 0; // Any Port