Wrap sendPingsAutomatically
This commit is contained in:
parent
bce99d8884
commit
a13b497b31
@ -72,6 +72,12 @@ void uWS_App_ws(const FunctionCallbackInfo<Value> &args) {
|
|||||||
behavior.closeOnBackpressureLimit = maybeCloseOnBackpressureLimit.ToLocalChecked()->Int32Value(isolate->GetCurrentContext()).ToChecked();
|
behavior.closeOnBackpressureLimit = maybeCloseOnBackpressureLimit.ToLocalChecked()->Int32Value(isolate->GetCurrentContext()).ToChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* sendPingsAutomatically or default */
|
||||||
|
MaybeLocal<Value> 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 */
|
/* Compression or default, map from 0, 1, 2 to disabled, shared, dedicated. This is actually the enum */
|
||||||
MaybeLocal<Value> maybeCompression = behaviorObject->Get(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "compression", NewStringType::kNormal).ToLocalChecked());
|
MaybeLocal<Value> maybeCompression = behaviorObject->Get(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "compression", NewStringType::kNormal).ToLocalChecked());
|
||||||
if (!maybeCompression.IsEmpty() && !maybeCompression.ToLocalChecked()->IsUndefined()) {
|
if (!maybeCompression.IsEmpty() && !maybeCompression.ToLocalChecked()->IsUndefined()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user