tiqi-group / pydase

A Python library for creating remote control interfaces of Python objects.
https://pydase.readthedocs.io
MIT License
1 stars 1 forks source link

Pass additional keyword arguments to `socketio.AsyncClient` called in `pydase.Client` #164

Open lmaisenbacherberkeley opened 6 days ago

lmaisenbacherberkeley commented 6 days ago

Is your feature request related to a problem? Please describe. Currently I can't see a way to pass arguments to socketio.AsyncClient internally called when initializing a new client with pydase.Client. This prevents the setting of connection parameters through keyword arguments such as "reconnection_attempts". By default "reconnection_attempts" is set to zero, which means unlimited reconnection attempts. This is a problem when an invalid URL is provided to the client and an error message should be generated in this case after some timeout, because the AsyncClient will just keep trying to connect without ever timing out. One could catch this with an external loop around the client initialization, but I would prefer being able to set connection parameters without having to extend the client class.

Describe the solution you'd like E.g., pass a dictionary to pydase.Client with keyword arguments for socketio.AsyncClient.