Only use socket.io client version 2, other won't work.
Best way is to install it with yarn add socket.io-client@v2-latest.
yarn add socket.io-client@v2-latest
Or using Documentation.
import { batchRequest, get } from "schulmanager";import io from 'socket.io-client';// Follow README to get tokenconst response = await batchRequest(token, [ get('null:get-websocket-push-url'),] as const);const socket = io(response.results[0]);
Generated using TypeDoc
WebSocket
Important
Only use socket.io client version 2, other won't work.
Best way is to install it with
yarn add socket.io-client@v2-latest
.Or using Documentation.
How to connect - Example