Click here to Skip to main content
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 20: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 OriginalGriff 230
1 PIEBALDconsult 150
2 DamithSL 125
3 BillWoodruff 108
4 Garth J Lancaster 90
0 OriginalGriff 5,790
1 DamithSL 4,601
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,195


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2014
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