OnP2PConnectionFailed passes error enum

This commit is contained in:
Garry Newman 2019-06-19 11:25:16 +01:00
parent 7c50db6997
commit ef071d3d71
3 changed files with 4 additions and 3 deletions

View File

@ -933,7 +933,7 @@ internal enum RegisterActivationCodeResult : int
// //
// EP2PSessionError // EP2PSessionError
// //
internal enum P2PSessionError : int public enum P2PSessionError : int
{ {
None = 0, None = 0,
NotRunningApp = 1, NotRunningApp = 1,

View File

@ -33,7 +33,7 @@ internal static void Shutdown()
internal static void InstallEvents() internal static void InstallEvents()
{ {
P2PSessionRequest_t.Install( x => OnP2PSessionRequest?.Invoke( x.SteamIDRemote ) ); P2PSessionRequest_t.Install( x => OnP2PSessionRequest?.Invoke( x.SteamIDRemote ) );
P2PSessionConnectFail_t.Install( x => OnP2PConnectionFailed?.Invoke( x.SteamIDRemote ) ); P2PSessionConnectFail_t.Install( x => OnP2PConnectionFailed?.Invoke( x.SteamIDRemote, (P2PSessionError) x.P2PSessionError ) );
} }
/// <summary> /// <summary>
@ -47,7 +47,7 @@ internal static void InstallEvents()
/// All queued packets unsent at this point will be dropped, further attempts /// All queued packets unsent at this point will be dropped, further attempts
/// to send will retry making the connection (but will be dropped if we fail again). /// to send will retry making the connection (but will be dropped if we fail again).
/// </summary> /// </summary>
public static Action<SteamId> OnP2PConnectionFailed; public static Action<SteamId, P2PSessionError> OnP2PConnectionFailed;
/// <summary> /// <summary>
/// This should be called in response to a OnP2PSessionRequest /// This should be called in response to a OnP2PSessionRequest

View File

@ -74,6 +74,7 @@ internal static string Expose( string name )
if ( name == "InventoryDefId" ) return "public"; if ( name == "InventoryDefId" ) return "public";
if ( name == "P2PSend" ) return "public"; if ( name == "P2PSend" ) return "public";
if ( name == "RoomEnter" ) return "public"; if ( name == "RoomEnter" ) return "public";
if ( name == "P2PSessionError" ) return "public";
return "internal"; return "internal";
} }