Click here to Skip to main content
15,846,145 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to develop a chating program in java using nio channels .i created a login class in which the registered users can login to the chat.when the user logs in ,the name of that user is sent to the server.In the server the users names are stored in a vector.That part shows working without any problem.Then I try to send the name of all the users to all the connected users.But thats not working.Each time a new user login that must be updated.how is it possible.I want to see all the connected users as we see in googletalk,nimbuz..please help me..thanks in advance.
Posted
Comments
TorstenH. 18-Apr-12 5:37am    
one should be enough.
TorstenH. 18-Apr-12 5:41am    
Why is it not working?

You are sending the name to the clients - do they receive the info?
The clients need to update the list of users in the chat. Is THIS working?
The client should be able to see what the new user types. is THIS working?
The new User should be able to see what the client types. is THIS working?

One at a time, try to develop it. You need to make small steps, don't try to do it all in one approach.
appu1988 18-Apr-12 23:18pm    
When a new user logs in ,all other users need to update their list.That part not working.
TorstenH. 19-Apr-12 1:12am    
so you have trouble updating the List<user>.
Let me ask one more - do you use a chat server or at least some service on a Server to identify and coordinate the chat?
appu1988 19-Apr-12 2:20am    
By chatserver i meant by the program that i have created to handle clients.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900