Ayse
Ayse

Reputation: 2754

Sending same information from UDP server to all clients at a time without using Broadcast

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?

Upvotes: 0

Views: 263

Answers (1)

user207421
user207421

Reputation: 310840

I want to send same information after specific time intervals from UDP server to all clients at a time without using Broadcast.

Then you have to use multicast. There is no other way to satisfy the 'at the same time' requirement.

Is this a correct approach?

No. Nothing that does one send to one client at a time satisfies your stated requirement.

Multicast is also a lot simpler than trying to implement it all yourself.

Upvotes: 1

Related Questions