summaryrefslogtreecommitdiff
path: root/runtime/js/30_net.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/30_net.js')
-rw-r--r--runtime/js/30_net.js19
1 files changed, 3 insertions, 16 deletions
diff --git a/runtime/js/30_net.js b/runtime/js/30_net.js
index 1a5f5116d..db00f5a2b 100644
--- a/runtime/js/30_net.js
+++ b/runtime/js/30_net.js
@@ -5,19 +5,8 @@
const { errors } = window.__bootstrap.errors;
const { read, write } = window.__bootstrap.io;
- const ShutdownMode = {
- // See http://man7.org/linux/man-pages/man2/shutdown.2.html
- // Corresponding to SHUT_RD, SHUT_WR, SHUT_RDWR
- 0: "Read",
- 1: "Write",
- 2: "ReadWrite",
- Read: 0, // TODO: nonsense, remove me.
- Write: 1,
- ReadWrite: 2, // unused
- };
-
- function shutdown(rid, how) {
- return core.jsonOpAsync("op_shutdown", { rid, how });
+ function shutdown(rid) {
+ return core.jsonOpAsync("op_shutdown", { rid });
}
function opAccept(rid, transport) {
@@ -78,9 +67,8 @@
core.close(this.rid);
}
- // TODO(lucacasonato): make this unavailable in stable
closeWrite() {
- shutdown(this.rid, ShutdownMode.Write);
+ shutdown(this.rid);
}
}
@@ -221,7 +209,6 @@
opListen,
Listener,
shutdown,
- ShutdownMode,
Datagram,
};
})(this);