diff --git a/src/AppWrapper.h b/src/AppWrapper.h index d36a5d3..233da48 100644 --- a/src/AppWrapper.h +++ b/src/AppWrapper.h @@ -72,6 +72,12 @@ void uWS_App_ws(const FunctionCallbackInfo &args) { behavior.closeOnBackpressureLimit = maybeCloseOnBackpressureLimit.ToLocalChecked()->Int32Value(isolate->GetCurrentContext()).ToChecked(); } + /* sendPingsAutomatically or default */ + MaybeLocal maybeSendPingsAutomatically = behaviorObject->Get(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "sendPingsAutomatically", NewStringType::kNormal).ToLocalChecked()); + if (!maybeSendPingsAutomatically.IsEmpty() && !maybeSendPingsAutomatically.ToLocalChecked()->IsUndefined()) { + behavior.sendPingsAutomatically = maybeSendPingsAutomatically.ToLocalChecked()->Int32Value(isolate->GetCurrentContext()).ToChecked(); + } + /* Compression or default, map from 0, 1, 2 to disabled, shared, dedicated. This is actually the enum */ MaybeLocal maybeCompression = behaviorObject->Get(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "compression", NewStringType::kNormal).ToLocalChecked()); if (!maybeCompression.IsEmpty() && !maybeCompression.ToLocalChecked()->IsUndefined()) {