Click here to Skip to main content
11,640,521 members (60,369 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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 28-Mar-13 19:01pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
ayesha hassan at 30-Mar-13 0:40am
   
I am creating a .txt file for this purpose. Is it right ?
H.Brydon at 30-Mar-13 14:50pm
   
Yeah, no problem with that.
ayesha hassan at 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)

  Print Answers RSS
0 Mika Wendelius 370
1 OriginalGriff 205
2 Afzaal Ahmad Zeeshan 130
3 CPallini 125
4 DamithSL 105
0 Mika Wendelius 370
1 OriginalGriff 205
2 CPallini 125
3 DamithSL 105
4 Afzaal Ahmad Zeeshan 70


Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100