2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-05-06 19:42:58 +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 ReadyEvent(DistributedConnection sender);
public delegate void ErrorEvent(DistributedConnection sender, byte errorCode, string errorMessage); public delegate void ErrorEvent(DistributedConnection sender, byte errorCode, string errorMessage);
public delegate void ResumedEvent(DistributedConnection sender);
Timer keepAliveTimer; Timer keepAliveTimer;
/// <summary>
/// Ready event is raised when autoReconnect is enabled and the connection is restored.
/// </summary>
public event ResumedEvent OnResumed;
/// <summary> /// <summary>
/// Ready event is raised when the connection is fully established. /// Ready event is raised when the connection is fully established.
/// </summary> /// </summary>
@ -1433,6 +1440,8 @@ public partial class DistributedConnection : NetworkConnection, IStore
return false; return false;
} }
OnResumed?.Invoke(this);
return true; return true;
} }