Connecting to a Websocket Server is quite a standard thing and done all over the place. There are good libraries doing that job and doing that job well (error handling/performance/testing/maintenance/security fixes). We're using a custom implementation in elsock.py and i pledge for replacing it with an external library.
Connecting to a Websocket Server is quite a standard thing and done all over the place. There are good libraries doing that job and doing that job well (error handling/performance/testing/maintenance/security fixes). We're using a custom implementation in
elsock.py
and i pledge for replacing it with an external library.Lately i looked into https://github.com/jeffthibault/python-nostr (which has a very nice and clean codebase btw) and it's using https://github.com/websocket-client/websocket-client which seem to be a quite mature thing.
Update: The idea is stupid as the ElectrumConnection is not a websocket connection but a custom socket-protocol.