summaryrefslogtreecommitdiff
path: root/ext/net/01_net.js
diff options
context:
space:
mode:
authorYosi Pramajaya <yosi.pramajaya@gmail.com>2022-01-31 22:36:54 +0700
committerGitHub <noreply@github.com>2022-01-31 16:36:54 +0100
commit3e566bb457663cec57602e564f73ded817e426a8 (patch)
tree7644ed068287f35060cf1a0c7c1827c629778df9 /ext/net/01_net.js
parentb7b6b9c9e5b84dea67ff6a2b691245f640644b2c (diff)
feat(ext/net): Add Conn.setNoDelay and Conn.setKeepAlive (#13103)
Diffstat (limited to 'ext/net/01_net.js')
-rw-r--r--ext/net/01_net.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/net/01_net.js b/ext/net/01_net.js
index 4a4005954..6f54ec999 100644
--- a/ext/net/01_net.js
+++ b/ext/net/01_net.js
@@ -95,6 +95,14 @@
closeWrite() {
return shutdown(this.rid);
}
+
+ setNoDelay(nodelay = true) {
+ return core.opSync("op_set_nodelay", this.rid, nodelay);
+ }
+
+ setKeepAlive(keepalive = true) {
+ return core.opSync("op_set_keepalive", this.rid, keepalive);
+ }
}
class Listener {