![]() |
Halyri - Häke
0.9
|
Class for sending keepalive messages to server. More...
Public Member Functions | |
Pinger (int interval, Connection connection) | |
Creates the pinger. More... | |
void | StartPinger () |
Starts the pinger by creating a new timer and an event handler. Keepalive message interval is entered here. More... | |
Private Member Functions | |
void | StopPinger () |
Stops the pinger by removing the event handler. More... | |
async void | SendKeepalive (object sender, EventArgs e) |
Sends the keepalive message on regular intervals. If the connection is lost, stops the pinger and shows a message box to user. More... | |
Private Attributes | |
int | keepaliveIntervalSeconds |
Connection | connection |
DispatcherTimer | dispatcherTimer |
Class for sending keepalive messages to server.
<author>Ilkka Rautiainen</author>
Hake_WPF.Network.Pinger.Pinger | ( | int | interval, |
Connection | connection | ||
) |
Creates the pinger.
interval | interval of keepalive messages in seconds |
connection | connection |
|
private |
Sends the keepalive message on regular intervals. If the connection is lost, stops the pinger and shows a message box to user.
void Hake_WPF.Network.Pinger.StartPinger | ( | ) |
Starts the pinger by creating a new timer and an event handler. Keepalive message interval is entered here.
|
private |
Stops the pinger by removing the event handler.
|
private |
|
private |
|
private |