Click here to Skip to main content
11,796,275 members (77,341 online)
Rate this: bad
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
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.
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 Maciej Los 460
1 Abhinav S 368
2 OriginalGriff 340
3 CPallini 269
4 Sergey Alexandrovich Kryukov 252
0 OriginalGriff 2,012
1 Maciej Los 1,615
2 KrunalRohit 1,310
3 CPallini 1,015
4 Richard MacCutchan 828

Advertise | Privacy | Mobile
Web02 | 2.8.151002.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