Winsocket Problem

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

I need a detailed sample. Thank you very much.
LVL 2
jonaleeAsked:
Who is Participating?
 
saneesh100Connect With a Mentor Commented:
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 255.255.255.255

  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 saneesh@usa.net


0
 
trestanCommented:
There is an introduction and example codes about network communicaion.
http://devcentral.iftech.com/learning/tutorials/nt/nt3.asp
0
 
jonaleeAuthor Commented:
I need more detailed thing about how to write the coding for broadcasting, not the NamePipe and MailSlot.

Thanks.

0
 
jonaleeAuthor Commented:
Thank you for the help
0
 
jonaleeAuthor Commented:
Thank you for the help
0
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.