mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-20 01:40:29 +00:00
config for compression
This commit is contained in:
@ -69,7 +69,14 @@ void RelayServer::runWebsocket(ThreadPool<MsgWebsocket>::Thread &thr) {
|
||||
|
||||
|
||||
|
||||
hubGroup = hub.createGroup<uWS::SERVER>(uWS::PERMESSAGE_DEFLATE | uWS::SLIDING_DEFLATE_WINDOW, cfg().relay__maxWebsocketPayloadSize);
|
||||
{
|
||||
int extensionOptions = 0;
|
||||
|
||||
if (cfg().relay__compression__enabled) extensionOptions |= uWS::PERMESSAGE_DEFLATE;
|
||||
if (cfg().relay__compression__slidingWindow) extensionOptions |= uWS::SLIDING_DEFLATE_WINDOW;
|
||||
|
||||
hubGroup = hub.createGroup<uWS::SERVER>(extensionOptions, cfg().relay__maxWebsocketPayloadSize);
|
||||
}
|
||||
|
||||
if (cfg().relay__autoPingSeconds) hubGroup->startAutoPing(cfg().relay__autoPingSeconds * 1'000);
|
||||
|
||||
|
Reference in New Issue
Block a user