UtilNetworkPing Method

Pings the specified address or hostname to determine whether a remote computer is accessible over the network.

Definition

Namespace: DevCase.Core.Networking.Common
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool Ping(
	string address,
	int timeOut = 1000,
	byte[] bufferData = null,
	bool fragmentData = false,
	int timeToLive = 128
)

Parameters

address  String
The computer that is the destination for the ICMP echo message.

The value specified for this parameter can be a hostname or an IP address.

timeOut  Int32  (Optional)
The maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message. Default value is 200.
bufferData  Byte  (Optional)
The data to be sent with the ICMP echo message and returned in the ICMP echo reply message.

The array cannot contain more than 65,500 bytes.

fragmentData  Boolean  (Optional)
Controls the fragmentation of the data sent to the remote host.

If set to , the data is sent in multiple packets. Default value is .

timeToLive  Int32  (Optional)
The number of routing nodes that can forward the Ping data before it is discarded.

Default value is 128.

Return Value

Boolean
if ping operation success, otherwise.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also