Version: 2017.3

Ping

class in UnityEngine

切换到手册

描述

对任何给定 IP 地址(以点表示法给定)执行 Ping 操作。

Ping 操作是异步的,可以使用 Ping.isDone 轮询 ping 对象以获得状态。 收到响应时,它处于 Ping.time。

Note: On Windows Store Apps a stream socket is used to mimic ping functionality, it will try to open connection to specified ip address with port 80. Also you need to enable InternetClient capability in Package.appxmanifest.

变量

ipping 的 IP 目标。
isDoneping 功能是否已完成?
time在 isDone 返回 true 之后,此属性包含 ping 时间结果。

构造函数

Ping对提供的目标 IP 地址执行 ping 操作。