Bugfix for socket get_clients call
Code refactoring for public librairies