Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: Transmitting from server to all clients.

  1. #1
    Forum Squatter newbie's Avatar
    Join Date
    Nov 2010
    Location
    North Wales
    Posts
    661
    My Mood
    Stressed
    Thanks
    28
    Thanked 115 Times in 106 Posts
    Blog Entries
    1

    Default Transmitting from server to all clients.

    I've currently got a basic echoing server which can handle multiple clients via threading.
    I've got it so that i can see all client messages via the server, but now I want to transmit the messages the server receives from all clients, to all clients (where clients see what other clients have said via the server).

    My question is... is there a 'broadcast all' or similar methods available that I might not have come across?
    Or if there isn't what approach would drive me in the right direction? such as storing all client sockets in an arraylist, or somehow directly access the ServerSocket object in a totally different class.

    Sorry for long and perhaps vague question, but all and any help will be greatly appreciated.
    Last edited by newbie; December 19th, 2010 at 07:35 PM.


Similar Threads

  1. UDP Server Client program to send and receive messages
    By Koren3 in forum Java Networking
    Replies: 1
    Last Post: September 5th, 2011, 11:16 AM
  2. Please help !! on orbit server
    By aneeshpqr in forum Java Servlet
    Replies: 1
    Last Post: September 18th, 2010, 08:47 AM
  3. Java chatting program implementing socket logic
    By sivakrishna.g in forum Java Networking
    Replies: 2
    Last Post: October 20th, 2009, 01:47 AM
  4. [SOLVED] Problem in UDS client,server program
    By Koren3 in forum Java Networking
    Replies: 8
    Last Post: March 28th, 2009, 04:05 PM
  5. Replies: 1
    Last Post: March 3rd, 2009, 08:04 AM