Click here to Skip to main content
11,924,487 members (56,123 online)
Rate this:
Please Sign up or sign in to vote.
See more: C Win32 udp Network
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
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 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151125.3 | 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