Winsocket Problem

Is there any method to use Winsocket create a Broadcast application? Is that mean that I use UDP to send data to, then all the Subnet will receive the data?

I need a detailed sample. Thank you very much.
Who is Participating?
I think the given hints will be enough for u to make a prog to do this..

1)   first make a socket of type SOCK_DGRAM
2)  change socket to SO_BROADCATS using setsockopt          function.
3) now u can use sendto fn with address  as

  the above was for the clinet( one who sends data,,)

and for server,, just use dgram socket.. with in a lopp with recvfrom any addrees INADDR_ANY ..

 if u need more detailed sample.. ican send u if u can send u'r email id..
 my id is

There is an introduction and example codes about network communicaion.
jonaleeAuthor Commented:
I need more detailed thing about how to write the coding for broadcasting, not the NamePipe and MailSlot.


jonaleeAuthor Commented:
Thank you for the help
jonaleeAuthor Commented:
Thank you for the help
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.