List of clients
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Maya_Pand
Posted On:   Thursday, September 26, 2002 04:37 PM

How do i get a list of clients connected to the server?
I am using HTTP to communicate between client and Servlet.
Actually, I want to broadcast a packet to all the connected clients.

Re: List of clients

Posted By:   Brian_Glodde  
Posted On:   Thursday, September 26, 2002 04:47 PM

I don't know about the broadcasting, but when a user connects, you can aggregate any information you like at the Application layer of the web app. Your listener would be interested in the following events:


void contextDestroyed (ServletContextEvent sce)

Notification that the Servlet context is about to be shut down.


void contextInitialized (ServletContextEvent sce)

Notification that the Web Application is ready to process requests.


At each you would add user information to your Vector (or whatever data structure you choose) or remove user info.


Oreilly article on Listeners


Hope that helps.

About | Sitemap | Contact