Hi I am developing a chap application which i have to submit after a day.So plz. reply me soon. Problem is that, Client A wants to chat with Client B and vice versa.This will be done as follows, 1:Client A first send message to Server then Server will send message to Client B. In my programe Client A is sending message to Server But Server is not giving sending message to Client B. How it will be done.Remember my server is dealing with multiple clients using threads. Viki.
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
Hi, You have to manage a vector on server in which u store all login users ids and in your case when A send message to B first server application checks in its userlist vector and then call its thread and send message.........
now viki do one thing create an object of hashtable class available in java.util.Hashtable n then put all the Socket's out stream and socket in hastable after that u can manage it. h.put(socket's stream,socket s); do this n then get n enumerationg after the client request. Remember use pooling other wise situation of dead lock may occur.
Originally posted by Ali Hassaan: Hi, You have to manage a vector on server in which u store all login users ids and in your case when A send message to B first server application checks in its userlist vector and then call its thread and send message.........
Hi ali When the client connects to the server , then how does the client see's the list of connected cients on the server which are stored inside a vector or a hash table. Does the server sends the vector object to the client for making a selection? Please guide me a bit Thanks in advance
Been there. Done that. Went back for more. But this time, I took this tiny ad with me: