You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to Web Sockets specification, there can be 'n' clients which needs 'n' pygls instances. According to the current implementation, only once connection can be supported properly for one pygls process. And it is not practical to start a new WS process every time I need attach a new client.
This can be enhanced (or in fact rectified) by simply providing new pygls instance (object) for every new connection instead of pointing to the same self.lsp instance.
ref: code
we can maintain a list of tuples (websocket, pygls instance) for every new connection and should be managed by the same.
More over this cannot be handled in the same way TCP or IO as there will be only one instance per process in these cases, but in WS case, we need multiple in single process.
The text was updated successfully, but these errors were encountered:
Sorry for the late reply. Could you give a use case or example of this issue? I don't doubt its usefulness, just want to understand it better. Thank you.
Sorry for the late reply. Could you give a use case or example of this issue? I don't doubt its usefulness, just want to understand it better. Thank you.
Currently this only supports one live WS client at any point. To use this with multiple clients in parallel, you need to create multiple WS servers which is not ideal.
Problem is that the WS server is tightly coupled with pygls object/instance. Separate this and make sure that multiple pygls instances can be called from WS server.
Hi,
According to Web Sockets specification, there can be 'n' clients which needs 'n' pygls instances. According to the current implementation, only once connection can be supported properly for one pygls process. And it is not practical to start a new WS process every time I need attach a new client.
This can be enhanced (or in fact rectified) by simply providing new pygls instance (object) for every new connection instead of pointing to the same self.lsp instance.
ref: code
we can maintain a list of tuples (websocket, pygls instance) for every new connection and should be managed by the same.
More over this cannot be handled in the same way TCP or IO as there will be only one instance per process in these cases, but in WS case, we need multiple in single process.
The text was updated successfully, but these errors were encountered: