TPingClient
From Ultibo.org
								
												
				Return to Unit Services
Description
To be documented
Class definitions
TPingClient = class(TWinsock2RAWClient)
public 
 | |
 constructor Create;
 | 
|
private 
 | |
 FSize:LongWord;
 | 
|
 FCount:LongWord;
 | 
|
 FTimeout:LongWord;
 | 
|
 FTimeToLive:Byte;
 | 
|
 FNoFragment:Boolean;
 | 
|
 FLastHost:String;
 | 
|
 FLastAddress:String;
 | 
|
 FLastTime:LongWord;
 | 
|
 FReplyAddress:String;
 | 
|
 FLastSequence:Word;
 | 
|
 FLastIdentifier:Word;
 | 
|
 FSendCount:LongWord;
 | 
|
 FReceiveCount:LongWord;
 | 
|
 FLostCount:LongWord;
 | 
|
 procedure SetSize(ASize:LongWord);
 | 
|
 procedure SetCount(ACount:LongWord);
 | 
|
 procedure SetTimeout(ATimeout:LongWord);
 | 
|
 procedure SetTimeToLive(ATimeToLive:Byte);
 | 
|
 procedure SetNoFragment(ANoFragment:Boolean);
 | 
|
 function GetLastCount:LongWord;
 | 
|
 function GetErrorCode:LongInt;
 | 
|
 function GetErrorText:String;
 | 
|
protected 
 | |
 procedure ResetPing; virtual;
 | 
|
public 
 | |
 property Size:LongWord read FSize write SetSize;
 | 
|
 property Count:LongWord read FCount write SetCount;
 | 
|
 property Timeout:LongWord read FTimeout write SetTimeout;
 | 
|
 property TimeToLive:Byte read FTimeToLive write SetTimeToLive;
 | 
|
 property NoFragment:Boolean read FNoFragment write SetNoFragment;
 | 
|
 property LastHost:String read FLastHost;
 | 
|
 property LastAddress:String read FLastAddress;
 | 
|
 property LastTime:LongWord read FLastTime;
 | 
|
 property LastCount:LongWord read GetLastCount;
 | 
|
 property ReplyAddress:String read FReplyAddress;
 | 
|
 property LastSequence:Word read FLastSequence;
 | 
|
 property LastIdentifier:Word read FLastIdentifier;
 | 
|
 property SendCount:LongWord read FSendCount;
 | 
|
 property ReceiveCount:LongWord read FReceiveCount;
 | 
|
 property LostCount:LongWord read FLostCount;
 | 
|
 property ErrorCode:LongInt read GetErrorCode;
 | 
|
 property ErrorText:String read GetErrorText;
 | 
|
 function FirstPing(const AHost:String):Boolean;
 | 
|
 function NextPing:Boolean;
 | 
|
Function declarations
constructor TPingClient.Create;
Description: Constructor for TPingClient class
| Note | None documented | 
|---|
procedure TPingClient.SetSize(ASize:LongWord);
Description: Set the size in bytes of the data for the ping request
| Note | None documented | 
|---|
procedure TPingClient.SetCount(ACount:LongWord);
Description: Set the number of ping requests to perform
| Note | None documented | 
|---|
procedure TPingClient.SetTimeout(ATimeout:LongWord);
Description: Set the time to wait for a reply to each request (Milliseconds)
| Note | None documented | 
|---|
procedure TPingClient.SetTimeToLive(ATimeToLive:Byte);
Description: Set the time to live in hops for each request
| Note | None documented | 
|---|
procedure TPingClient.SetNoFragment(ANoFragment:Boolean);
Description: Set the don't fragment bit in the header of each request
| Note | None documented | 
|---|
function TPingClient.GetLastCount:LongWord;
Description: Get the current count after the latest request
| Note | None documented | 
|---|
function TPingClient.GetErrorCode:LongInt;
Description: Get the error code from the latest request
| Note | None documented | 
|---|
function TPingClient.GetErrorText:String;
Description: Get the error message from the latest request
| Note | None documented | 
|---|
procedure TPingClient.ResetPing;
Description: Reset the state and clear the current ping request
| Note | None documented | 
|---|
function TPingClient.FirstPing(const AHost:String):Boolean;
Description: Start a new ping sequence to the specified host or address
| Host | The host name or address to ping | 
|---|---|
| Note | After the first ping, NextPing should be called repeatedly until completed. | 
function TPingClient.NextPing:Boolean;
Description: Continue pinging the current address with the current parameters
| Note | Once LastCount equals Count the sequence is complete and this method will return False | 
|---|
Return to Unit Reference