Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

listing connected clients through winsock

Hi there, how can i accomplish this.

when a user connects to the server i want it to trigger something that will send all the users that are connected the name of the new user who connected.

i.e. userA connects, and the server sends to all other connected users that UserA has connected and keeps that name in the list ( which is a treeview right now) then if UserB connects, it sends to everyone that he has connected ( puts his name in the treeview) then is UserB connects i need it to send something to the server that will in turn tell all clients that UserB has left.

Basically like a chatroom list of whos in the chatroom. Thanks!
[666 byte] By [vchatlive] at [2007-11-11 10:19:06]
# 1 Re: listing connected clients through winsock
my think is to make a timed routin in each client that go every time period and get the updated list, don't overload too many work at the server, it will not support to send every few seconds to send in a big connected list the new connected person ...
the routin in the client must request the user list every few time .. this list could be some where far like in external file or dynamic database ..
Amahdy at 2007-11-11 17:22:48 >