title: Sending UDP packets from the iPhone
body: <p>Does anyone have any good tutorials on sending UDP packets from the iPhone SDK?</p>
  
  <p>EDIT:</p>
  
  <p>Was actually really easy to do this...</p>
  
  <p><em>RTFM!</em></p>
  
  <p>After including AsyncUdpSocket just add this in header:</p>
  
  <pre><code>AsyncUdpSocket *socket;
  </code></pre>
  
  <p>And in main:</p>
  
  <pre><code>NSData *data = ... 
  [socket sendData:data toHost:@"192.168.x.x" port:5002 withTimeout:-1 tag:1];
  </code></pre>
  
  <p>When testing don't forget to allow UDP communication on your server firewall!</p>