1

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.

Zed-K
  • 991
  • 2
  • 8
  • 23

3 Answers3

1

Look into DatagramSocket class. Alchemy will not reveal hidden system capabilities for you, it's about transferring fast arythmetics into flash bytecode.

alxx
  • 9,897
  • 4
  • 26
  • 41
  • Well... "Note: Sending data to a broadcast address is not supported." =/ http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/DatagramSocket.html – Zed-K May 09 '11 at 23:30
  • That's all we got in AIR. It seems that without native helper answer to question is 'no'. – alxx May 10 '11 at 06:01
  • Seems like I'm always looking for things that cannot be done... Thanks anyway! – Zed-K May 10 '11 at 09:20
0

You could call a web service from Air

http://www.depicus.com/wake-on-lan/wake-on-lan-web-service.aspx

depicus
  • 301
  • 4
  • 19
-2

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

nicopowa
  • 459
  • 3
  • 11