Active client array

Is it possible for a solution to query Servoy Server for an array of current active clients?

Yes, you can do this by using the functions: application.addClientInfo & application.getClientCountForInfo

see example data:

//Add additional info to a client which can be viewed in the admin page
application.addClientInfo('alias sick fish');

//Get a count for all clients having the same additional info line
var count = application.getClientCountForInfo('alias sick fish');

All thanks goes to Stef! He paid for this function! :)

But that will give you only the COUNT for a certain info. So if Morley adds for example the user name as info, he will have to loop over all users in the security, ask for the count for a certain user name and if that is 1, he knows the user is online. This is a bit unhandy and doesn’t give you for example the possibility of getting the IP address of a certain user, which would be very useful for the UDP plugin…

I have posted this feature request: http://forum.servoy.com/viewtopic.php?t=5145

So if you add your vote, we might be getting access to something more convenient. :lol:

Patrick

Yeah sorry! You can only count with that, indeed! not retrieving an array.