mirror of
https://github.com/hoytech/strfry.git
synced 2024-09-20 00:36:33 +00:00
websocket-level pings
This commit is contained in:
parent
3009ac1305
commit
efd40be1aa
@ -89,6 +89,9 @@ config:
|
||||
- name: relay__maxWebsocketPayloadSize
|
||||
default: 131072
|
||||
noReload: true
|
||||
- name: relay__autoPingSeconds
|
||||
default: 55
|
||||
noReload: true
|
||||
- name: relay__queryTimesliceBudgetMicroseconds
|
||||
default: 10000
|
||||
- name: relay__maxFilterLimit
|
||||
|
@ -60,6 +60,8 @@ void RelayServer::runWebsocket(ThreadPool<MsgWebsocket>::Thread &thr) {
|
||||
|
||||
hubGroup = hub.createGroup<uWS::SERVER>(uWS::PERMESSAGE_DEFLATE | uWS::SLIDING_DEFLATE_WINDOW, cfg().relay__maxWebsocketPayloadSize);
|
||||
|
||||
if (cfg().relay__autoPingSeconds) hubGroup->startAutoPing(cfg().relay__autoPingSeconds * 1'000);
|
||||
|
||||
hubGroup->onHttpRequest([&](uWS::HttpResponse *res, uWS::HttpRequest req, char *data, size_t length, size_t remainingBytes){
|
||||
LI << "HTTP request for [" << req.getUrl().toString() << "]";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user