MCPcopy Create free account
hub / github.com/codersgyan/realtime-code-editor / initSocket

Function initSocket

src/socket.js:3–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { io } from 'socket.io-client';
2
3export const initSocket = async () => {
4 const options = {
5 'force new connection': true,
6 reconnectionAttempt: 'Infinity',
7 timeout: 10000,
8 transports: ['websocket'],
9 };
10 return io(process.env.REACT_APP_BACKEND_URL, options);
11};

Callers 1

initFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected