diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2021-01-13 01:17:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-12 16:17:31 -0800 |
| commit | 8142496c571e7a5e42f2a2886fe005c27d96f616 (patch) | |
| tree | a4e9a1d152f4738f4667995ddc735309be74deb2 /cli/dts/lib.deno.ns.d.ts | |
| parent | 8d5af6ca5264201be1cb04b0bb1a0b88ce5166da (diff) | |
feat: stabilize Deno.shutdown() and Conn#closeWrite()
Closes: #9099
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
| -rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 736f99f0d..8026d934a 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -1711,11 +1711,7 @@ declare namespace Deno { /** The resource ID of the connection. */ readonly rid: number; /** Shuts down (`shutdown(2)`) the writing side of the TCP connection. Most - * callers should just use `close()`. - * - * **Unstable** because of lack of testing and because Deno.shutdown is also - * unstable. - * */ + * callers should just use `close()`. */ closeWrite(): void; } @@ -1809,6 +1805,18 @@ declare namespace Deno { */ export function connectTls(options: ConnectTlsOptions): Promise<Conn>; + /** Shutdown socket send operations. + * + * Matches behavior of POSIX shutdown(3). + * + * ```ts + * const listener = Deno.listen({ port: 80 }); + * const conn = await listener.accept(); + * Deno.shutdown(conn.rid); + * ``` + */ + export function shutdown(rid: number): Promise<void>; + export interface Metrics { opsDispatched: number; opsDispatchedSync: number; |
