Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/http/server.ts>Server

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class Server
implements AsyncIterable<ServerRequest>
import { Server } from "https://deno.land/std@0.73.0/http/server.ts";

Constructors

new
Server(listener: Deno.Listener)

Properties

private
closing: boolean
private
connections: Deno.Conn[]

Methods

private
acceptConnAndIterateHttpRequests(mux: MuxAsyncIterator<ServerRequest>): AsyncIterableIterator<ServerRequest>
private
iterateHttpRequests(conn: Deno.Conn): AsyncIterableIterator<ServerRequest>
private
trackConnection(conn: Deno.Conn): void
private
untrackConnection(conn: Deno.Conn): void
close(): void
[Symbol.asyncIterator](): AsyncIterableIterator<ServerRequest>