Refactoring messages
authorDavid Négrier <d.negrier@thecodingmachine.com>
Fri, 15 May 2020 20:04:49 +0000 (22:04 +0200)
committerDavid Négrier <d.negrier@thecodingmachine.com>
Fri, 15 May 2020 20:04:49 +0000 (22:04 +0200)
commit5a3668a12e8c75d6b8220f1bdeec4375cef2a883
treea270128fb81bda0917ee16edca4c40e341268583
parent2411a3f85a53d1ed16ae713d20cc63581cd8a1c3
Refactoring messages

Socket.io can stringify JSON messages itself, so there is no need to pass a string to "emit". You can pass a serializable object!

This commit removes all the useless toJson() methods, JSON.serialize and JSON.parse!

Woot!
back/src/Controller/IoSocketController.ts
front/src/Connexion.ts
front/src/WebRtc/SimplePeer.ts