Click to See Complete Forum and Search --> : broadcast a udp to "255.255.255.255" ?
wxuf
March 10th, 2004, 04:35 AM
hi,
What does this mean ? of course there is a port such as 61450.
I am a little confused with the SOCK_DGRAM.
Should the server and client create the same type socket ?
When I broadcast a udp to "255.255.255.255", what would
happen ?
Please help to explain
wxuf
Andreas Masur
March 10th, 2004, 04:43 AM
[Moved thread]
wxuf
March 10th, 2004, 04:46 AM
Originally posted by Andreas Masur
[Moved thread]
?? can you explain more details ?
Thank you
wxuf
mamut
March 10th, 2004, 05:04 AM
sendto 255.255.255.255:
If the socket option SO_BROADCAST is not set, nothing happens.
If sendflag = MSG_DONTROUTE, all host in your LAN segment can receive your message.
If sendflag = 0, your gateway router(s) will make decision of broadcasting the message to other network segments.
Andreas Masur
March 10th, 2004, 05:29 AM
Originally posted by wxuf
?? can you explain more details ?
I simply moved your question to the appropriate forum... :cool:
wxuf
March 10th, 2004, 05:57 AM
en, I see something now..
just as mamut says, i will set the SO_BROADCAST by setsockopt()
in my project. And the aim of my project is to get all the ips in the
LAN, after I broadcast a udp to "255.255.255.255", is that
possible that other pcs send back a udp to me ? sorry, it may
sounds naive..
wxuf
codeguru.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.