How do I ping from Flex - AIR?

雨燕双飞 提交于 2019-12-04 08:12:09

Otherwise you can use the NativeProcess class of the AIR 2.0 beta, and use the ping command of your operating system.

You can find informations on how to use it here.

According to the docs, SocketMonitor, descending from ServiceMonitor will check basic availability, but not a true ping. If you want to truly "ping" the server, you would need to use a socket an implement the protocol, This link to the Wikipedia article might help.

The AIR SDK offers some classes (URLMonitor, SocketMonitor) to handle this:

http://livedocs.adobe.com/flex/3/html/help.html?content=network_connectivity_1.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!