Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Cabecinha84 committed Oct 3, 2024
1 parent 509a899 commit 45ebdc4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion ZelBack/src/lib/socketServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,26 @@ class FluxWebsocketServer {

#socketServer = new WebSocketServer({
noServer: true,
perMessageDeflate: true,
perMessageDeflate: {
zlibDeflateOptions: {
// See zlib defaults.
chunkSize: 1024,
memLevel: 9,
level: 9,
},
zlibInflateOptions: {
chunkSize: 10 * 1024,
},
// Other options settable:
clientNoContextTakeover: true, // Defaults to negotiated value.
serverNoContextTakeover: true, // Defaults to negotiated value.
serverMaxWindowBits: 15, // Defaults to negotiated value.
clientMaxWindowBits: 15, // Defaults to negotiated value.
// Below options specified as default values.
concurrencyLimit: 3, // Limits zlib concurrency for perf.
threshold: 128, // Size (in bytes) below which messages
// should not be compressed if context takeover is disabled.
},
});

#routes = {};
Expand Down
2 changes: 1 addition & 1 deletion ZelBack/src/services/fluxCommunication.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ async function initiateAndHandleConnection(connection) {
zlibDeflateOptions: {
// See zlib defaults.
chunkSize: 1024,
memLevel: 10,
memLevel: 9,
level: 9,
},
zlibInflateOptions: {
Expand Down

0 comments on commit 45ebdc4

Please sign in to comment.