Manages a websocket connection to a FudgeServer and multiple rtc-connections to other FudgeClients. Processes messages from in the format FudgeNet.Message according to the controlling
fields FudgeNet.ROUTE and FudgeNet.COMMAND.
Sends out a disconnect message to all peers, disconnects from all peers and sends a CONNECT_HOST-command to the server,
to establish RTC-peer-connections between this client and all others, making this the host
Returns void
connectPeers
connectPeers(_ids): void
Parameters
_ids: string[]
Returns void
connectToPeer
connectToPeer(_idPeer): void
Tries to connect to another client with the given id via rtc
Parameters
_idPeer: string
Returns void
connectToServer
connectToServer(_uri?): void
Tries to connect to the server at the given url and installs the appropriate listeners
Parameters
_uri: string = "ws://localhost:8080"
Returns void
createMesh
createMesh(): void
Sends out a disconnect message to all peers, disconnects from all peers and sends a CREATE_MESH-command to the server,
to establish RTC-peer-connections between all clients
Manages a websocket connection to a FudgeServer and multiple rtc-connections to other FudgeClients.
Processes messages from in the format FudgeNet.Message according to the controlling fields FudgeNet.ROUTE and FudgeNet.COMMAND.
Author
Falco Böhnke, HFU, 2019 | Jirka Dell'Oro-Friedl, HFU, 2021-2022