[英]Android: ping without /system/bin/ping
On some devices, the binary /system/bin/ping
seems to be removed. 在某些设备上,似乎删除了binary
/system/bin/ping
。 When I connect the device by USB and type 当我通过USB连接设备并键入时
adb shell ping
it says: 它说:
/system/bin/sh: ping: not found
Is it possible to still send ping requests from such devices? 是否仍然可以从这些设备发送ping请求?
What are other alternatives to find out if a server is reachable or if packets get lost? 找出服务器是否可达或数据包是否丢失的其他替代方法是什么?
What's about InetAddress.isReachable() ? 什么是InetAddress.isReachable() ? Doc:
文档:
Tries to reach this InetAddress.
试图达到此InetAddress。 This method first tries to use ICMP (ICMP ECHO REQUEST), falling back to a TCP connection on port 7 (Echo) of the remote host.
此方法首先尝试使用ICMP(ICMP ECHO REQUEST),然后回退到远程主机的端口7(Echo)上的TCP连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.