View Single Post
  #1 (permalink)  
Old 05-02-2008, 06:28 PM
mholt mholt is offline
Newbie
 
Join Date: Jan 2008
Posts: 27
Rep Power: 3
mholt is on a distinguished road
Question Winsock: Receiving UDP broadcasts

I have successfully set up a UDP server, a UDP client, and am able to get them communicating one-on-one.

However, sending a message to all clients (is that the same as "broadcasting"? - the clients may not be on the same LAN, necessarily) - is not working.

EDIT: Okay, well, using SmartSniff I see that when the server sends a broadcasted UDP message, it goes to IP address 255.255.255.255. It's sending correctly but the client is not reading it. But wouldn't that send the message to only computers on a LAN, or does it go to all connected clients?

Either way, for small packet sizes (each less than 50 or 100 bytes), would it be okay to store each client's address in a container then loop through it and send each message individually?

What's the best way to send and receive UDP messages on a larger scale like this? (Being one server sending to many connected clients.)

Thanks!
-Matt


Another Edit: I did some more research and see that "multicasting" may be an option. However it looks like it has some restrictions... so how should I do this?

Last edited by mholt; 05-02-2008 at 10:50 PM.
Reply With Quote

Sponsored Links