File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes how to show connected users in the server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "how to show connected users in the server?" Watch "how to show connected users in the server?" New topic

how to show connected users in the server?

Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
i got the chat program running and now i am modeling the GUI. From applet -> Frames,,,

then i came to an idea to make my program look a bit like the yahoo messenger or the msn...

i want to know how to show the names of the connected users on the server.

any idea on this?
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

Simple: the client has to tell the server the name of the user. Usually there's a notion of logging in with a password, so users can't easily masquerade as one another, but if you wanted, the client could simply send (for example) a command like "Username: foo" as the first command after connecting.

[Jess in Action][AskingGoodQuestions]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: how to show connected users in the server?
Similar Threads
Chat Application...
User byte transfer rate
looking for code
Number of users connected to WAS 5.1
Really weird problem with JLabel (Self-Fixed, had nothing to do with JLabel)