Skip to content

Socket.IO

Socket.IO isn’t plain WebSocket — it has its own framing, namespacing, ack callbacks, and the option to fall back to long-polling. Restura speaks the protocol natively.

  • Connect to any Socket.IO server, with or without namespacing (/admin, etc.).
  • Auth payload on connect — sent in the auth field of the handshake.
  • Emit events — pick an event name, send a JSON / string / number payload.
  • Listen — subscribe to event names; live messages stream into the transcript.
  • Acks desktop only — the callback-based response pattern needs the desktop transport.
  • Reconnect — on/off, with backoff settings.

Socket.IO acks require a long-lived stateful association between the client emit and the server response that survives the request boundary. The web app routes Socket.IO through the Worker, which doesn’t preserve that ack-callback handle across the proxy. Desktop opens the socket directly in the Electron main process and gets the ack callback natively.

  • If you only need fire-and-forget emits and broadcast listening, the web app is fine.
  • If your test relies on socket.emit('event', payload, (response) => ...), use the desktop app.
  • WebSocket — when you need raw frames, not Socket.IO’s protocol on top.
  • Scripts — assert on incoming events.