diff options
Diffstat (limited to 'ext/net/lib.deno_net.d.ts')
-rw-r--r-- | ext/net/lib.deno_net.d.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts index 639d0f8af..136723262 100644 --- a/ext/net/lib.deno_net.d.ts +++ b/ext/net/lib.deno_net.d.ts @@ -61,6 +61,20 @@ declare namespace Deno { * callers should just use `close()`. */ closeWrite(): Promise<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. + */ + ref(): void; + /** **UNSTABLE**: New API, yet to be vetted. + * + * Make the connection not block the event loop from finishing. + */ + unref(): void; + readonly readable: ReadableStream<Uint8Array>; readonly writable: WritableStream<Uint8Array>; } |