Version: 2022.3
言語: 日本語

Ping

class in UnityEngine

マニュアルに切り替える

説明

IP アドレスに対して ping を実行します。

The ping operation is asynchronous and a ping object can be polled for status using Ping.isDone. When a response is received it is in Ping.time.

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.

変数

ip特定の ping の IP アドレス
isDoneping 関数が完了したときに true を返します
timeThis property contains the ping time result in milliseconds after isDone returns true.

コンストラクタ

Ping指定した IP アドレスへの ping を実行します
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961