python-websocket-server
python-websocket-server copied to clipboard
Single client disconnection
I do have reason to believe that this works.
Thanks for this. However some refactoring will be required before I'll be able to merge this.
Namely there's two main issues:
- There's some discussion of having a dictionary of clients (https://github.com/Pithikos/python-websocket-server/issues/66). That will avoid unnecessary loops.
- I try to avoid introducing new functions if it can be done with existing ones. I think a better implementation would be to change the existing methods to simply take
clientsas either a list ofclient_idorclient. That will cover more arbitrary cases (e.g. closing 2 or 3 clients) without changing the API that much. So by default all clients are disconnected unless user specifies specific clients.
Thanks for this. However some refactoring will be required before I'll be able to merge this.
The inability to disconnect a specific client by id is a massive miss here and seriously hobbles the utility of this library.