Einzelnen Beitrag anzeigen

Klaus01
Online

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#4

AW: syncronen ICS Ping abbrechen?

  Alt 27. Apr 2015, 09:18
..warum willst Du den Thread vor Ablauf des Timeouts beenden.
Es könnte doch sein, dass innerhalb der 3 Sekunden ein Antwort ankommt.

Was ich damit sagen will, setze den Timeout entsprechend Deiner Netzqualität.
Ein Ping-Response der länger als 500ms benötigt ist doch eher unwahrscheinlich.

Code:
ping www.delphipraxis.net

Pinging www.delphipraxis.net [88.198.53.15] with 32 bytes of data:
Reply from 88.198.53.15: bytes=32 time=125ms TTL=56
Reply from 88.198.53.15: bytes=32 time=52ms TTL=56
Reply from 88.198.53.15: bytes=32 time=250ms TTL=56
Reply from 88.198.53.15: bytes=32 time=113ms TTL=56

Ping statistics for 88.198.53.15:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 52ms, Maximum = 250ms, Average = 135ms

ping www.google.com

Pinging www.google.com [173.194.113.116] with 32 bytes of data:
Reply from 173.194.113.116: bytes=32 time=50ms TTL=58
Reply from 173.194.113.116: bytes=32 time=50ms TTL=58
Reply from 173.194.113.116: bytes=32 time=49ms TTL=58
Reply from 173.194.113.116: bytes=32 time=49ms TTL=58

Ping statistics for 173.194.113.116:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 49ms, Maximum = 50ms, Average = 49ms
Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat