summaryrefslogtreecommitdiff
path: root/runtime/js/40_http.js
blob: 6ec8f4314a3bee917d2d489a3a5886cddb2e1b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { core } from "ext:core/mod.js";
const ops = core.ops;
import { HttpConn } from "ext:deno_http/01_http.js";

function serveHttp(conn) {
  const rid = ops.op_http_start(conn.rid);
  return new HttpConn(rid, conn.remoteAddr, conn.localAddr);
}

export { serveHttp };