Datagram Networking Not Getting any Data?

e-t172 e-t172 at akegroup.org
Sun May 4 00:36:57 PDT 2008


Andrew Wiley a écrit :
> The problem isn't the protocol or understanding how it works. The problem is getting my program to receive DHCP requests, which are UDP packets sent to 255.255.255.255 to port 67. Attached is my main loop to receive packets. You can see where I have basically removed all packet processing. It looks like it should just print "Packet!" whenever a UDP packet arrives on port 67, but it doesn't.

You need to set the SO_BROADCAST flag in the socket. Use 
Socket.setOption() to do this, with SocketOption.SO_BROADCAST.



More information about the Digitalmars-d mailing list