← Back to index
interface Deno.Conn
extends Reader, Writer, Closer

Properties

🔗
localAddr: Addr

The local address of the connection.

🔗
remoteAddr: Addr

The remote address of the connection.

🔗
rid: number

The resource ID of the connection.

🔗
readable: ReadableStream<Uint8Array>
🔗
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

UNSTABLE: New API, yet to be vetted.

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

UNSTABLE: New API, yet to be vetted.

Make the connection not block the event loop from finishing.