# Ping

> Ping any given IP address (given in dot notation).

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public sealed class Ping
```

## Remarks

The ping operation is asynchronous and a ping object can be polled for status using [Ping.isDone](/engine/6000.0/script-reference/unityengine/ping/isdone.md). When a response is received it is in [Ping.time](/engine/6000.0/script-reference/unityengine/ping/time.md).

**Windows Store Apps**: A stream socket is used to mimic ping functionality, it will try to open a connection to specified IP address using port 80. For this to work correctly, InternetClient capability must be enabled in Package.appxmanifest.

**Android**: ICMP sockets are used for ping operation if they're available, otherwise Unity spawns a child process **/system/bin/ping** for ping operations. To check if ICMP sockets are available, you need to read the contents for **/proc/sys/net/ipv4/ping*****group*****range**. If ICMP sockets are available, this file should contain an entry for **0 2147483647**.

## Constructors

| Constructor                                                                     | Description                                       |
| ------------------------------------------------------------------------------- | ------------------------------------------------- |
| [Ping(System.String)](/engine/6000.0/script-reference/unityengine/ping/ctor.md) | Perform a ping to the supplied target IP address. |

## Properties

| Property                                                             | Description                                                                            |
| -------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [ip](/engine/6000.0/script-reference/unityengine/ping/ip.md)         | The IP target of the ping.                                                             |
| [isDone](/engine/6000.0/script-reference/unityengine/ping/isdone.md) | Has the ping function completed?                                                       |
| [time](/engine/6000.0/script-reference/unityengine/ping/time.md)     | This property contains the ping time result in milliseconds after isDone returns true. |
