Results 1 to 3 of 3
  1. #1
    Ambergahill is offline Member
    Join Date
    Nov 2010
    Rep Power

    Smile 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!

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    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

  3. #3
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Destiny Islands
    Rep Power


    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?

Similar Threads

  1. Replies: 1
    Last Post: 10-25-2010, 11:21 PM
  2. Multiple Sockets on a single Port
    By Sajith in forum Networking
    Replies: 2
    Last Post: 08-16-2010, 06:31 PM
  3. MDB listening
    By nipunalk in forum Advanced Java
    Replies: 5
    Last Post: 01-20-2010, 05:10 AM
  4. Replies: 1
    Last Post: 06-26-2009, 03:24 PM
  5. Listening to a Printer
    By Mosd in forum New To Java
    Replies: 0
    Last Post: 08-12-2008, 12:21 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts