:TTL


Class

     aprICMP()

 

Syntax

     :TTL( [nTTL] ) --> nSeconds

 

Parameters

 

nTimeToLive

The time-to-live value for the next ICMP datagram.

 

Return

nSeconds:

If nTTL is passed, nSeconds is the previous value of the Time-To-Live (TTL) Setting.

If no parameter is passed, the return value is the current setting.

If an Error occurred, the return value is ICMP_ERROR. To get extended error information, see :nErr or :cErr for further imformation.

 

Description

The :TimeToLive() Method sets the maximum time-to-live for the next ICMP datagram sent by the client.

 

Remarks
The time-to-live (TTL) value is specified in the IP header of a datagram, and is used to control the number of routers that the datagram is passed through. Each router that handles the datagram decrements the TTL value by one. When it drops to zero, a datagram is returned to the sender, specifying that the TTL has been exceeded.

Calling this function changes the default TTL value for all subsequent ICMP datagrams sent by the library, with the default value being 255. Note that not all Windows Sockets implementations support setting the time-to-live value.

 

Note: :TTL() is simply a pass through Method for :TimeToLive.

 

See Also

:PacketSize, :GetSendCount, :GetRecvCount, :TimeToLive, :GetTripTime, :SequenceId