summaryrefslogtreecommitdiff
path: root/cli/bench/http/deno_http_ops.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/bench/http/deno_http_ops.js')
-rw-r--r--cli/bench/http/deno_http_ops.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/cli/bench/http/deno_http_ops.js b/cli/bench/http/deno_http_ops.js
index 3fd0bef31..216a47905 100644
--- a/cli/bench/http/deno_http_ops.js
+++ b/cli/bench/http/deno_http_ops.js
@@ -13,7 +13,10 @@ class Http {
[Symbol.asyncIterator]() {
return {
next: async () => {
- const reqEvt = await Deno.core.opAsync("op_http_accept", this.id);
+ const reqEvt = await Deno[Deno.internal].core.opAsync(
+ "op_http_accept",
+ this.id,
+ );
return { value: reqEvt ?? undefined, done: reqEvt === null };
},
};
@@ -21,20 +24,20 @@ class Http {
}
for await (const conn of tcp) {
- const id = Deno.core.ops.op_http_start(conn.rid);
+ const id = Deno[Deno.internal].core.ops.op_http_start(conn.rid);
const http = new Http(id);
(async () => {
for await (const req of http) {
if (req == null) continue;
const { 0: stream } = req;
- await Deno.core.opAsync(
+ await Deno[Deno.internal].core.opAsync(
"op_http_write_headers",
stream,
200,
[],
"Hello World",
);
- Deno.core.close(stream);
+ Deno[Deno.internal].core.close(stream);
}
})();
}