GeeCON Prague 2014*
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


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
Author

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
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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]
 
GeeCON Prague 2014
 
subject: how to show connected users in the server?