Socket.io performs a long upgrade process to get the actual WebSocket initially connected (unless you're only using the WebSocket transport, which isn't usually recommended for most apps). So using Socket.io on the server takes MUCH longer than simply firing XHR requests.
This zone plugin will need to convert socket calls to proper XHR requests. The existing XHR-zone is already handling Authorization headers for JWTs, so this shouldn't need to worry about auth.
Doing this in can-zone is probably more complicated than needed.
Socket.io performs a long upgrade process to get the actual WebSocket initially connected (unless you're only using the WebSocket transport, which isn't usually recommended for most apps). So using Socket.io on the server takes MUCH longer than simply firing XHR requests.
This zone plugin will need to convert socket calls to proper XHR requests. The existing XHR-zone is already handling Authorization headers for JWTs, so this shouldn't need to worry about auth.Doing this in can-zone is probably more complicated than needed.
Current API for setting up a Feathers client looks like this:
The only change necessary will be switching the import from
feathers-socketio
tofeathers-socketio-ssr
: