Web Development

Our forums are currently in maintenance mode and the ability to post is disabled. We will be back up and running as soon as possible. Thanks for your patience!

General discussion


Broadcasting Data Grams

By saratchandra_a ·
Please provide me with some working code that broadcasts a datagram over the local area netwrok. I have tried using setsockopt but it gives me error if I set the SO_BROADCAST FLAG AT THE SOL_SOCKET LEVEL. I will be grateful to you if you get me out of it.
Thank you

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by DSR28 In reply to Broadcasting Data Grams

You just need to "send" the UPD packet to the broadcast address for the network, and it will be broadcast!

(The broadcast network address is the last address in the subnet) For example, with a netmask of, the bcast address for IP address block is

I hope this helps

Related Discussions

Related Forums