summaryrefslogtreecommitdiff
path: root/cli/bench/http/deno_http_ops.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-01-24 18:54:10 +0100
committerGitHub <noreply@github.com>2023-01-24 18:54:10 +0100
commitabd96105300a7729a4d8eb69af2e81dd6307a163 (patch)
tree75b7556f876b2a2df3e22b905922dfb11572ef6d /cli/bench/http/deno_http_ops.js
parent1084027d502d54ebf256c867fe85600b295d8a06 (diff)
refactor: remove Deno.core (#16881)
This commit removes "Deno.core" namespace. It is strictly private API that has no stability guarantees, we were supposed to remove it long time ago. Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
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);
}
})();
}