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

x/ayonli_jsext/lib.deno.d.ts>Deno.Conn

A JavaScript extension package for building strong and modern applications.
Latest
interface Deno.Conn
implements Reader, Writer, Closer, Disposable
import { type Deno } from "https://deno.land/x/ayonli_jsext@v0.9.72/lib.deno.d.ts";
const { Conn } = Deno;

Properties

readonly
localAddr: Addr

The local address of the connection.

readonly
remoteAddr: Addr

The remote address of the connection.

readonly
deprecated
rid: number

The resource ID of the connection.

readonly
readable: ReadableStream<Uint8Array>
readonly
writable: WritableStream<Uint8Array>

Methods

closeWrite(): Promise<void>

Shuts down (shutdown(2)) the write side of the connection. Most callers should just use close().

ref(): void

Make the connection block the event loop from finishing.

Note: the connection blocks the event loop from finishing by default. This method is only meaningful after .unref() is called.

unref(): void

Make the connection not block the event loop from finishing.