mirror of
https://github.com/SteamAutoCracks/DepotDownloaderMod.git
synced 2026-02-10 20:00:55 +01:00
Added a CallbackMgr.RunWaitCallbacks overload that supports a timeout.
This commit is contained in:
@@ -75,16 +75,23 @@ namespace SteamKit2
|
||||
|
||||
Handle( call );
|
||||
}
|
||||
public void RunWaitCallbacks()
|
||||
public void RunWaitCallbacks( TimeSpan timeout )
|
||||
{
|
||||
#if STATIC_CALLBACKS
|
||||
var call = SteamClient.WaitForCallback( true );
|
||||
var call = SteamClient.WaitForCallback( true, timeout );
|
||||
#else
|
||||
var call = client.WaitForCallback( true );
|
||||
var call = client.WaitForCallback( true, timeout );
|
||||
#endif
|
||||
|
||||
if ( call == null )
|
||||
return;
|
||||
|
||||
Handle( call );
|
||||
}
|
||||
public void RunWaitCallbacks()
|
||||
{
|
||||
RunWaitCallbacks( TimeSpan.FromMilliseconds( -1 ) );
|
||||
}
|
||||
|
||||
|
||||
internal void Register( ICallback call )
|
||||
|
||||
Reference in New Issue
Block a user