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

    Default User List + Other rooms

    Hi,

    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?

    Cheers

  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default

    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, 05:24 PM
  2. Replies: 3
    Last Post: 11-21-2009, 05:48 PM
  3. how to create list of list in java ???
    By ilayaraja in forum Advanced Java
    Replies: 1
    Last Post: 10-26-2009, 04:30 PM
  4. Linked List integer list
    By igniteflow in forum Advanced Java
    Replies: 1
    Last Post: 12-10-2008, 08: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, 12: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
  •