feat(backend): no compression & volatile
* Should enable for more performances when there are a lot of users * Messages are pretty small so compression might not be needed * Volatile reduces the number of exchanges between the server and the clients
This commit is contained in:
parent
e2ddcbf162
commit
6f68f9f21f
@ -202,14 +202,14 @@ function startBackendServer(port) {
|
||||
if (smallestScreenResolutions && smallestScreenResolutions[whiteboardId] && socket && socket.id) {
|
||||
delete smallestScreenResolutions[whiteboardId][socket.id];
|
||||
}
|
||||
socket.broadcast.emit('refreshUserBadges', null); //Removes old user Badges
|
||||
socket.compress(false).volatile.broadcast.emit('refreshUserBadges', null); //Removes old user Badges
|
||||
sendSmallestScreenResolution();
|
||||
});
|
||||
|
||||
socket.on('drawToWhiteboard', function (content) {
|
||||
content = escapeAllContentStrings(content);
|
||||
if (accessToken === "" || accessToken == content["at"]) {
|
||||
socket.broadcast.to(whiteboardId).emit('drawToWhiteboard', content); //Send to all users in the room (not own socket)
|
||||
socket.compress(false).volatile.broadcast.to(whiteboardId).emit('drawToWhiteboard', content); //Send to all users in the room (not own socket)
|
||||
s_whiteboard.handleEventsAndData(content); //save whiteboardchanges on the server
|
||||
} else {
|
||||
socket.emit('wrongAccessToken', true);
|
||||
|
Loading…
Reference in New Issue
Block a user