7 Commits

Author SHA1 Message Date
cd4979c3be Generate userIDs on server-side
We don't want to depend on:

1) socket.io generated IDs because they change on server reconnect
2) simple-peer generated IDs because they change for every peer
connection

We generate a single ID when the call web page is refreshed and use that
throughout the session (until page refresh).

We keep relations of user-id to socket-id on the server side in memory
and use that to get to the right socket. In the future this might be
replaced with Redis to allow multiple nodes.

If the server is restarted, but people have active calls, we want them
to keep using the active peer connections and only connect to new peers.

Ideally, we do not want to disturb the active peer connections, but peer
connections might be restarted because the in-memory store will not have
the information on for any peers in the room upon restart.
2020-03-13 13:33:54 +01:00
8c0377bdaf Make socket automatically do the handshake on each reconnect 2020-03-10 12:10:08 +01:00
7fa09fa6b8 Use TypedEmitter for client socket connections 2019-11-15 23:38:19 -03:00
b7f2b454ba Replace underscore by lodash 2019-11-13 22:16:34 -03:00
3a5b07c218 Fix broken ts build 2019-11-13 20:08:10 -03:00
4fa6a0d17a Refactor all components 2019-11-13 18:36:31 -03:00
e9926e3484 Refactor actions/reducers to TS 2019-11-13 11:16:09 -03:00