Hey Everyone,
This is my first post. Recently, I have been working on an instant messenger program in java. I have created the networking part of the client, and I have almost finished the server side. I know the program works and I am allowed to send messages, but now I am thinking about adding a feature that lets the user see who else is connected to the server, but i can not think of how to do this. Anyone have any ideas?
stupidenator
0
Junior Poster
DanielWilliams
commented:
Can anyone pick out for me the best product among those listed on this site?
+0
Recommended Answers
Jump to PostDo you intent to allow the client A to see all the other clients who are logged in .
I think you should use broadcast from the server to clients whenever a new client gets added or leaves. The server must already be maintaing the list of clients.
Also whenever …
Jump to PostI do want all other clients to see who is logged in. I was originally thinking that I would save all names to a linked list... but the problem I am having is that I can not figure out how I am going to send the username to the server …
Jump to PostOK I see your code. But as far as I understand you have not implemented any user mechanism in your server. So basically any once with the client program can connect to your server. Now coming back to your requirement for "a feature that lets the user see who else …
Jump to Postplease do NOT send it. Clearly they want it for homework.
Jump to PostSorry piyali, I only understand English grammar. Since nobody is aware of Google, I decided to be a nice guy and find some resources for all of you.
http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html
All 35 Replies
aj.wh.ca
0
Junior Poster in Training
DanielWilliams
commented:
Can anyone pick out for me the best product among those listed on this site?
+0
stupidenator
0
Junior Poster
aj.wh.ca
0
Junior Poster in Training
stupidenator
0
Junior Poster
stupidenator
0
Junior Poster
aj.wh.ca
0
Junior Poster in Training
stupidenator
0
Junior Poster
nausherwan644
0
Newbie Poster
server_crash
64
Postaholic
nausherwan644
0
Newbie Poster
server_crash
64
Postaholic
stupidenator
0
Junior Poster
Ghost
0
Posting Whiz
stupidenator
0
Junior Poster
mmiikkee12
1
Posting Whiz in Training
server_crash
64
Postaholic
amsjavan
0
Newbie Poster
amsjavan
0
Newbie Poster
amsjavan
0
Newbie Poster
mark_terri
0
Newbie Poster
Easter Bunny
0
Junior Poster in Training
razibcse
0
Newbie Poster
Tivoilos
0
Newbie Poster
stupidenator
0
Junior Poster
piyali
0
Newbie Poster
BeccaD123
0
Newbie Poster
piyali
0
Newbie Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
Phaelax
52
Practically a Posting Shark
peter_budo
commented:
NIce resources, but they expected us to do they homework :)
+6
bloody_ninja
commented:
I search google; it brings me to this post.
+1
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.