I have application that is sending some data over the network. It uses port 10000. The destination is unknown. By unknown it means that there is no specific PC on network that will receive data. Now I want to write applicaton that will listen on port 10000 and receive data. This application will run on many PCs. So, first PC is sending data to other (unknown number of computers) PCs on network. Each other PC that connects to my local network and listen on port 10000 should be able to receive data on port 10000. Is this possible? Any link for example (C# or Java)?
Asked
Active
Viewed 204 times
0
-
You should use UDP multicast for this rather than broadcasting as you've been advised. UDP broadcast has been deprecated for about 20 years except as a startup mechanism. – user207421 Jan 30 '14 at 21:44
2 Answers
2
The concept is called broadcasting. Here are examples in Java and C#:
Be aware that it only works with UDP! So be prepared for packet loss and the like.
Oh and it also only works for local networks. No broadcasting to the internet!

Community
- 1
- 1

Jonas Bötel
- 4,452
- 1
- 19
- 28
1
"Broadcasting" over the network on specific port will do sending packets to all system connected to same network and listening for "UDP" packet at specific port will do receiving at specific system ends.

bibek shrestha
- 448
- 3
- 9