4 ms·
I tried to make something with websockets a few weeks ago. My backend was a simple Python3 web server and I just didn’t have the chops to make it work alongsid
by gorgoiler 5y ago
I tried to make something with websockets a few weeks ago. My backend was a simple Python3 web server and I just didn’t have the chops to make it work alongside the asyncio websockets stuff.
The alternate solution which worked exceptionally well was to make an XHR which the server would hold open and only respond to once an event occurred. The moment the XHR response arrives, another one is set up to wait for the next event.
I made a proof of concept that sent my keystrokes from the server to the browser. It was so snappy it was like typing locally.