![]() |
Diffusion .NET Classic API - Core and Common
5.9.4
|
Handles connections to the Diffusion server and optionally retries the connection. More...
Public Member Functions | |
DiffusionConnectionHelper (IDiffusionClientEvents eventHandler) | |
Constructor. More... | |
void | Start () |
Starts the service, that is, the timer controlling reconnection attempts. More... | |
void | Stop (bool notify=true) |
Stops the service. More... | |
Properties | |
bool | Enabled [get, set] |
Indicates whether the service is enabled. If false, no connection retries will be performed. More... | |
bool | StopRequested [get, set] |
Flag to request that the service stops when it has finished its most recent reconnection attempt. More... | |
bool | IsRunning [get, set] |
Indicates whether the service is running. More... | |
int | ReconnectAttempts [get, set] |
The number of reconnection attempts. Defaults to 10. More... | |
int | ReconnectInterval [get, set] |
The interval between retry attempts (ms). Defaults to 1000 (1 second). More... | |
Events | |
EventHandler< EventArgs > | OnConnect |
The event fired to notify subscribers that they should attempt to connect. More... | |
EventHandler < DiffusionReconnectionEventArgs > | Started |
The event fired when the service has started. More... | |
EventHandler < DiffusionReconnectionEventArgs > | Stopped |
The event fired when the service has stopped. More... | |
EventHandler < DiffusionReconnectionEventArgs > | Reconnecting |
The event fired when the service is attempting to reconnect. More... | |
EventHandler < DiffusionReconnectionEventArgs > | Completed |
The event fired when the service has completed, i.e. it has tried to connect ReconnectAttempts times. More... | |
EventHandler < DiffusionReconnectionEventArgs > | EnabledChanged |
The event fired when the state of the 'Enabled' flag changes. More... | |
![]() | |
EventHandler< EventArgs > | OnConnect |
The event fired to notify subscribers that they should attempt to connect. More... | |
EventHandler < DiffusionReconnectionEventArgs > | Started |
The event fired when the service has started. More... | |
EventHandler < DiffusionReconnectionEventArgs > | Stopped |
The event fired when the service has stopped. More... | |
EventHandler < DiffusionReconnectionEventArgs > | Reconnecting |
The event fired when the service is attempting to reconnect. More... | |
EventHandler < DiffusionReconnectionEventArgs > | Completed |
The event fired when the service has completed, i.e. it has tried to connect 'ReconnectAttempts' times. More... | |
EventHandler < DiffusionReconnectionEventArgs > | EnabledChanged |
The event fired when the state of the 'Enabled' flag changes. More... | |
Handles connections to the Diffusion server and optionally retries the connection.
PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.DiffusionConnectionHelper | ( | IDiffusionClientEvents | eventHandler | ) |
Constructor.
eventHandler |
void PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Start | ( | ) |
Starts the service, that is, the timer controlling reconnection attempts.
void PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Stop | ( | bool | notify = true | ) |
Stops the service.
|
getset |
Indicates whether the service is enabled. If false, no connection retries will be performed.
|
getset |
Indicates whether the service is running.
|
getset |
The number of reconnection attempts. Defaults to 10.
|
getset |
The interval between retry attempts (ms). Defaults to 1000 (1 second).
|
getset |
Flag to request that the service stops when it has finished its most recent reconnection attempt.
EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Completed |
The event fired when the service has completed, i.e. it has tried to connect ReconnectAttempts times.
EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.EnabledChanged |
The event fired when the state of the 'Enabled' flag changes.
EventHandler<EventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.OnConnect |
The event fired to notify subscribers that they should attempt to connect.
EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Reconnecting |
The event fired when the service is attempting to reconnect.
EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Started |
The event fired when the service has started.
EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Stopped |
The event fired when the service has stopped.