2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-05-06 11:32:59 +00:00
This commit is contained in:
Ahmed Zamil 2023-08-31 15:40:10 +03:00
parent 09b140416c
commit aff46be64d

View File

@ -49,10 +49,17 @@ public partial class DistributedConnection : NetworkConnection, IStore
{
public delegate void ReadyEvent(DistributedConnection sender);
public delegate void ErrorEvent(DistributedConnection sender, byte errorCode, string errorMessage);
public delegate void ResumedEvent(DistributedConnection sender);
Timer keepAliveTimer;
/// <summary>
/// Ready event is raised when autoReconnect is enabled and the connection is restored.
/// </summary>
public event ResumedEvent OnResumed;
/// <summary>
/// Ready event is raised when the connection is fully established.
/// </summary>
@ -1433,6 +1440,8 @@ public partial class DistributedConnection : NetworkConnection, IStore
return false;
}
OnResumed?.Invoke(this);
return true;
}