• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multithreaded server .......help  RSS feed

 
DeepakB
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends .
Can any body explain me how to create Private Room in java Chat server application . actually i am making a chat server application which has a 5 (five ) chat room ,but i couldn't understand how i can do that. This five chat room will display of total no of USERS Currently present in each rooms, i am using TCP/IP connection for connect to server.
Thanx in Advance
Deepak
 
gautham kasinath
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Well the best datastructure that I suppose you can use.. coz I ve used it with good results is.. a hashtable with (room, users) pair.. wherein the users is a vector or a string array.. I would suggest a vector that way keeping track of all the users leaving and joining a room would be easier..
Regds
Gautham Kasinath
Incase of more questions please mail me @ gkasinath@rediffmail.com
 
shailesh sonavadekar
Ranch Hand
Posts: 1874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deepakb , Welcome to javaranch.
PROPER NAMES ARE NOW REQUIRED
Please look carefully at official naming policy at javaranch & reregister yourself with proper first & last name. Please adhere to official naming policy & help maintain the decorum of the forum.
Waiting for your posts with proper first & last name. Once you have reregister , please let us know about that & then your previous account will be disabled.
Regards.

Your Friendly Bartender
Shailesh.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!