Finding the IP address in Adobe AIR

浪尽此生 提交于 2019-12-08 04:14:24

问题


How to know the IP address of the system in which the AIR application is currently running, Or how to restrict the usage of AIR application for a particular country?


回答1:


Please try the following code, it works for me.

import flash.net.InterfaceAddress;
import flash.net.NetworkInterface;

var netInterfaces:Vector.<NetworkInterface> = NetworkInfo.networkInfo.findInterfaces();
var addresses:Vector.<InterfaceAddress> = netInterfaces[0].addresses;
ipAddress = addresses[0].address;


来源:https://stackoverflow.com/questions/1679215/finding-the-ip-address-in-adobe-air

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