Thanks,

It's good to know, but no rush: actually it is possible to guesstimate 
that number with the number of threads used by the application.

If someone wonders about my question: knowing the number of active 
connections would be useful to know when to switch off a server 
executable (upon replacement by a newer version) without frustrating too 
many connected users. The version to be switched off knows (from a DB 
entry) that it should no accept new connections, so the active 
connections would progressively decrease, but there are probably usually 
a few dormant connections remaining.

Thinking loud: eventually it would be even possible to start the new 
version before stopping the old one. For that, I guess the old app 
should be able to refuse connections, not even accept connections with a 
minimal "Maintenance mode" message.

Cheers

Gautier


Le 25.03.2017 à 19:52, Pascal a écrit :
> Hello Gautier,
>
> The connections are recorded in map Socket_Map encapsulated in protected 
> object Connection_Manager :
> gnoga-server-connection.adb:913
>
> Unfortunately there is no Connection_Manager function to return the length of 
> the map.
>
> But it could be if you need it.
>
> HTH, Pascal.
> http://blady.pagesperso-orange.fr
>
>
>> Le 21 mars 2017 à 10:44, Gautier de Montmollin <gdem...@hotmail.com> a écrit 
>> :
>>
>> Hello,
>>
>> Is there a function to get the number of active connections ?
>>
>> I guess, if there isnt' one, it could be implemented with a global
>> Natural with pragma Volatile, and *incrementing* it could be done upon
>> connection, but how to do the *decrementing* properly ?
>>
>> For the latter, including a controlled type in the Connection_Data_Type
>> record extension could do the job upon Finalize, but perhaps there is a
>> less convoluted way.
>>
>> TIA
>>
>> Gautier
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gnoga-list mailing list
>> Gnoga-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to