Echo Method  
 

Send an ICMP echo datagram to the specified host.

Syntax

object.Echo( [RemoteHost], [Timeout], [TimeToLive] )

Parameters

RemoteHost
A string which specifies the host name or IP address which the ICMP echo datagram will be sent to. If this argument is omitted, the value of the HostAddress property will be used. If the HostAddress property has not been set, then the value of the HostName property will be used as the default value.
Timeout
An integer value which specifies the number of milliseconds until a blocking operation fails and the control returns an error. If this argument is omitted, the value of the Timeout property will be used as the default value.
TimeToLive
An integer value which specifies the time-to-live (TTL) value for the ICMP echo datagram. If this argument is omitted, the value of the TimeToLive property will be used as the default value. For more information about how this is used, refer to the TimeToLive property.

Return Value

A value of zero is returned if the operation was successful, otherwise a non-zero error code is returned which indicates the cause of the failure.

Remarks

The Echo method sends an ICMP echo datagram to the specified host. The failure for a host to respond to an ICMP echo datagram may not indicate a problem with the remote system. In some cases, a router between the local and remote host may be malfunctioning or discarding the datagrams. Systems can also be configured to specifically ignore ICMP echo datagrams and not respond to them; this is often a security measure to prevent certain kinds of Denial of Service attacks.

The ability to send ICMP datagrams may be restricted to users with administrative privileges, depending on the policies and configuration of the local system. If you are unable to send or receive any ICMP datagrams, it is recommended that you check the firewall settings and any third-party security software that could impact the normal operation of this component.

See Also

Blocking Property, HostAddress Property, HostName Property, Timeout Property, TimeToLive Property, TraceRoute Method, OnEcho Event, OnReply Event