# Socket.IO client (vendored)

Local copy of the Socket.IO browser client, bundled into the Conductør
app so the dashboard's WebSocket connection does not depend on a CDN
at runtime. Conductør runs at venues where internet may be unreliable;
offline-at-load is a hard requirement.

## Current version

| Field    | Value                                                              |
|----------|--------------------------------------------------------------------|
| File     | `socket.io-4.7.5.min.js`                                           |
| Version  | 4.7.5                                                              |
| Source   | https://cdn.socket.io/4.7.5/socket.io.min.js                       |
| SHA-256  | `73eba16bc895fdfa454e27ecb80def31ede8d861f99e175ff93b110eabec044f` |
| Size     | 49,993 bytes raw                                                   |

## Server pin

The Python `socket.io` server side must be on a wire-protocol-compatible
version. Socket.IO 4.x client talks to python-socketio 5.x server. Don't
upgrade either side without confirming the protocol matrix at
https://socket.io/docs/v4/migrating-from-3-x-to-4-0/.

## Updating

```bash
cd conductor/web/static/vendor/socket.io
VERSION=4.7.5   # bump
curl -sL "https://cdn.socket.io/${VERSION}/socket.io.min.js" -o "socket.io-${VERSION}.min.js"
shasum -a 256 "socket.io-${VERSION}.min.js"
# update SHA + version in this README and in templates/index.html, then
# delete the old socket.io-*.min.js
```
