Results 1 to 3 of 3
- 11-10-2010, 03:36 PM #1Member
- Join Date
- Nov 2010
- Rep Power
Sockets - 1 sender, but multiple listening
Hello, say for example I have a socketserver and 4 clients connecting to it. Only one of the 4 clients is sending any data, and the other 3 are receiving it. How would I accomplish this using sockets? Fast delivery of messages is very important.
I tried having all clients listen on the same socket.inputstream, but I don't think that is allowed. Thanks for any help you can provide!
- 11-11-2010, 03:15 AM #2
in theory, this might be possible if you use UDP datagram sockets, and have the sender send to the broadcast address. All receivers should be able to listen on that socket for stuff coming from any host.
Another idea is to try to use multicast sockets
- 11-11-2010, 03:27 AM #3
I may just be misunderstanding the question, but could you not just have the server pass any data it receives on to everyone who DIDN'T send it?
- By sadishm in forum NetworkingReplies: 1Last Post: 10-25-2010, 11:21 PM
- By Sajith in forum NetworkingReplies: 2Last Post: 08-16-2010, 06:31 PM
- By nipunalk in forum Advanced JavaReplies: 5Last Post: 01-20-2010, 05:10 AM
- By Omarero in forum NetworkingReplies: 1Last Post: 06-26-2009, 03:24 PM
- By Mosd in forum New To JavaReplies: 0Last Post: 08-12-2008, 12:21 PM