0 Replies Latest reply on Jun 30, 2010 9:44 PM by magicmouse

    How to bind to ports less than 1024?

    magicmouse Level 1

      I am trying to build a simple program that detects the presence of DHCP on the LAN.  This is a pretty simple thing really, you create a datagram packet and send a discover request the the DHCP server, which if it is running is on port 67, and I listen on port 68. The problem is that when you use datagramsocket class and create a socket, and then try to do a .bind() to a port that small in number (less than 1024) it refuses to do the bind. This is presumably some security issue, but how can I get around this? I guess I need socket policy file, but the user is running my app, do I have to include such a file with my .air file? Is this even possible? It seems a shame that I can't use air to test DHCP, it is such a nice environment to work in.

       

      edj