Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to send same information after specific time intervals from UDP server to all clients at a time without using Broadcast.
For this purpose, I am thinking of adding information of each Client which tries to communicate with the Server in some sort of text file, and then, when I want to send a single message to all connected Clients, I'll pick up IP addresses saved in the text file and will send data at those addresses only. Is this a correct approach?
Posted

1 solution

There is no shortcut to doing this besides compiling a list of target hosts and sending the UDP message to each. You obviously need to make a list, and saving this info in a file is a reasonable way to do it.

If you do this process once a day, there is no need to cache the info anywhere. If you do it once a minute, you probably want the source info in memory somewhere, cached to disk as appropriate. Saving to disk ("persistence") means that the info is saved for each time you run your program.
 
Share this answer
 
Comments
ayesha hassan 30-Mar-13 0:40am    
I am creating a .txt file for this purpose. Is it right ?
H.Brydon 30-Mar-13 14:50pm    
Yeah, no problem with that.
ayesha hassan 1-Apr-13 3:27am    
Thank you so much :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900