2022-01-07 22:09:52 -05:00
|
|
|
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
2021-07-12 06:44:49 -04:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
((window) => {
|
|
|
|
const core = window.__bootstrap.core;
|
2022-08-11 09:56:56 -04:00
|
|
|
const ops = core.ops;
|
2021-07-12 06:44:49 -04:00
|
|
|
const { HttpConn } = window.__bootstrap.http;
|
|
|
|
|
|
|
|
function serveHttp(conn) {
|
2022-08-11 09:56:56 -04:00
|
|
|
const rid = ops.op_http_start(conn.rid);
|
2022-03-16 09:54:18 -04:00
|
|
|
return new HttpConn(rid, conn.remoteAddr, conn.localAddr);
|
2021-07-12 06:44:49 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
window.__bootstrap.http.serveHttp = serveHttp;
|
|
|
|
})(globalThis);
|