开发者

Is it possible to send an ICMP echo request from a swf?

开发者 https://www.devze.com 2023-03-18 05:12 出处:网络
ActionScript 3 can send UDP packets via flash.net.DatagramSocket. Is their any way to send an ICMP packet? I\'d also like to set the开发者_如何学编程 TTL flag so I can implement traceroute in an SWF.U

ActionScript 3 can send UDP packets via flash.net.DatagramSocket. Is their any way to send an ICMP packet? I'd also like to set the开发者_如何学编程 TTL flag so I can implement traceroute in an SWF.


UDP is not available on Flash Player, only on Adobe AIR runtime. So if you are not targeting a browser, you can use it. I don't know if you can send an ICMP packet with DatagramSocket - but you could try to set the TTL like this example: http://blog.debit.nl/2010/06/mdns-daap-announce-air-2-0/

And you might be interested to see the flash.net.dns package: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/dns/package-detail.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号