Nov 28, 2014 at 12:22 PM
Using client-side Disconnected and Reconnected events might be tricky.
Here is the sample code that demonstrates the usage of these events:
- Add event handlers to ZyanConnection.Disconnected and Reconnected.
- Make sure Disconnected event handler sets e.Retry to true!
- Set ZyanConnection.PollingEnabled to true (heartbeat feature is disabled by default).
- Adjust ZyanConnection.PollingInterval as needed (it defaults to 1 heartbeat per minute).
- Add an event handler to ZyanConnection.NewLogonNeeded event to handle server restart!
- To enable polling diagnostics, set ZyanComponentHost.PollingEventTracingEnabled to true.
- Add an event handler to host.ClientHeartbeatReceived event.