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
Thnx for nice advice but i am using TCP/IP connection & getting communicat with server using server socket, clint socket..., any one can plz explain more.
I have a solution for you problem... Since it is a multithread server.... Keep seperate vector for each client who joins in a particuler room....
1.The steps are as follws.. GIve an option in the client to which room he/she is willing to join at the time of signing....
2. when he makes a connection.....get the room name and store his reference(ie socket refernce in a vector)... 3. when ever you want to send any msg to that room....
4. take the client details out of the vector...(Socket Details) and the send the msg through the socket output stream... 5. This is how I have done a multithread chat server using ConnectionOriented Service(TCP) 6.mail me if you still have any doubts.....
bye, ram..
It's weird that we cook bacon and bake cookies. Eat this tiny ad: