title: Sending Wake on LAN packet from Android to PC
body: <p>My Android app sends/retrieves data to/from the user's own PC using HTTP and it's working fine with a handful of beta testers. I now need to consider a situation where the PC is hibernating.</p>
  
  <p>I've never done this before but I've googled to find info about the WOL 'magic packet' and some simple source written in C (using CAsyncSocket at the client end). Doing this over a wi-fi connection on the user's home network is likely to be relatively straight-forward but ideally I want this to work over mobile internet (assuming the user can configure their home router to accept / forward the packet).</p>
  
  <p>I'm guessing I need to use some generic Java network code and I've been looking at <code>java.net</code>.</p>
  
  <p>At this point I can't decide whether I should be using <code>java.net.Socket</code> or <code>java.net.DatagramSocket</code>. So the question is, am I approaching this the right way and which of the two socket types should I be using (or would both suffice)? Many thanks.</p>