コード例 #1
0
        // pinger delegate callbacks

        private void OnStarted(object sender, SimplePingStartedEventArgs e)
        {
            statusLabel.Text = "pinging " + GetDisplayAddress(e.EndPoint);

            // Send the first ping straight away.

            pinger?.SendPing(null);
        }
コード例 #2
0
 /// <summary>
 /// Sends a ping.
 ///
 /// Called to send a ping, both directly (as soon as the SimplePing object starts up) and
 /// via a timer (to continue sending pings periodically).
 /// </summary>
 public void SendPing()
 {
     pinger?.SendPing(null);
 }