Results 1 to 2 of 2
  1. #1
    Noelf21 is offline Member
    Join Date
    Dec 2009
    Rep Power

    Default User List + Other rooms


    I'm trying to create multiple chatrooms using tcp java. i have two questions, was wondering how i would be able to display the users in the room e.g. type a key word to display who is there.

    The second thing is i want to make it so there is multiple rooms for the user to pick from how could i do these two things in the simplest way?


  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Rep Power


    I would model the room and the people chatting in the room as objects. Then you can pass people objects from client to client using object serialization. All the info about a client can be stored in the client object and retrieved by the other clients on the other end directly. When I implemented an IRC client/server, I kept the connected client list on the server and pushed it to each client as they connected. When a new user would connect or one would leave, I'd send a message to the server which then relayed a connect or disconnect message to each client.

    Good luck!

Similar Threads

  1. Replies: 2
    Last Post: 11-22-2009, 06:24 PM
  2. Replies: 3
    Last Post: 11-21-2009, 06:48 PM
  3. how to create list of list in java ???
    By ilayaraja in forum Advanced Java
    Replies: 1
    Last Post: 10-26-2009, 05:30 PM
  4. Linked List integer list
    By igniteflow in forum Advanced Java
    Replies: 1
    Last Post: 12-10-2008, 09:53 PM
  5. How to access ArrayList in List of List?
    By alvations in forum New To Java
    Replies: 5
    Last Post: 10-08-2008, 01:23 PM

Posting Permissions

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