A websocket implementation for zig
0

Configure Feed

Select the types of activity you want to include in your feed.

only enable compression if server_max_bits is 15 (default)

Karl Seguin (Feb 23, 2025, 5:54 PM +0800) d49d07f6 f50a5042

+7 -1
+1 -1
src/server/server.zig
··· 1516 1516 1517 1517 if (worker.compression) |configured_compression| { 1518 1518 const client_compression = handshake.compression; 1519 - if (client_compression.enabled) { 1519 + if (client_compression.enabled and client_compression.server_max_bits == 15) { 1520 1520 compression = .{ 1521 1521 .client_no_context_takeover = configured_compression.client_no_context_takeover or client_compression.client_no_context_takeover, 1522 1522 .server_no_context_takeover = configured_compression.server_no_context_takeover or client_compression.server_no_context_takeover,
+6
support/autobahn/server/main.zig
··· 53 53 .max_size = 1024, 54 54 .max_headers = 10, 55 55 }, 56 + .compression = .{ 57 + .write_threshold = 0, 58 + }, 56 59 }); 57 60 return try nonblocking_server.listenInNewThread({}); 58 61 } ··· 72 75 .timeout = 3, 73 76 .max_size = 1024, 74 77 .max_headers = 10, 78 + }, 79 + .compression = .{ 80 + .write_threshold = 0, 75 81 }, 76 82 }); 77 83 return try nonblocking_bp_server.listenInNewThread({});