I'm going to have a server that keeps track of online users.

When a client program logs onto the server [LOGON, username, ipaddress], the
client's data [username, ip address] will be added to the list of online

At the same time, the entire list of online users will be sent out to the
current client's online user JInternalFrame.

If the user quits the client program, upon detecting the windowClosing
method, inside the stop() method, I will write a data stream [LOGOUT,
username, ipaddress] back to the server to have this username removed from
the server.

These two steps are OK for me to write. However, let's say, if the client
hangs or ran into some exceptions, the server will need a way to test if the
user is still online. So, if the client program do not respond to the
request from the server, the server itself will remove the user from the
online users list and re-broadcast the current online users list to all
other connected clients.

How should I go about doing this? Checking for the existence of the client
program to see whether it's still 'alive' or not.

And, can I keep the online users that contains two fields [username,
ipaddress] in a Vector()?

How do I write them and how do I retrieve them?



Best Regards,
Wing Hoe
ICQ: 2213281
Email: winghoe@hotmail.com
www: http://pwp.maxis.net.my/winghoe