Title pretty much says it all... ;)
I'm looking for a way to allow my AIR application to wake a computer on my local network, but can't figure out how to send an UDP packet.
Of course I'm talking about an AS3/Flex/AIR solution, I know I could use NativeProcess but I'd like to stick with my multi-platform .air file.
I don't think AIR has support for broadcasting such UDP packets, but maybe someone will get an idea.
I don't know开发者_如何学编程 much about Alchemy, could it be of any help as it allows running C compiled code?Thanks in advance for your help.
Look into DatagramSocket class. Alchemy will not reveal hidden system capabilities for you, it's about transferring fast arythmetics into flash bytecode.
You could call a web service from Air
http://www.depicus.com/wake-on-lan/wake-on-lan-web-service.aspx
i see this question was posted a long time ago
in order to wake a computer, a magic packet needs to be sent over broadcast or directly to the machine IP. The packet structure is :
mac address parsed as int
0xFF
16 times hex mac address
sent over udp with DatagramSocket
i made a small AS3 library for this, you can find it on my website.
https://nicopr.fr/1446603389-wake-on-lan-with-actionscript
精彩评论