diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/diagnostics.rs | 1 | ||||
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 18 | ||||
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 26 |
3 files changed, 13 insertions, 32 deletions
diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs index 648d18f35..4f1ae0c96 100644 --- a/cli/diagnostics.rs +++ b/cli/diagnostics.rs @@ -34,7 +34,6 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[ "PluginPermissionDescriptor", "ReadPermissionDescriptor", "RunPermissionDescriptor", - "ShutdownMode", "Signal", "SignalStream", "StartTlsOptions", 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; diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 0eaed73ba..1de7ed8cc 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -835,32 +835,6 @@ declare namespace Deno { mtime: number | Date, ): Promise<void>; - /** **UNSTABLE**: Under consideration to remove `ShutdownMode` entirely. - * - * Corresponds to `SHUT_RD`, `SHUT_WR`, `SHUT_RDWR` on POSIX-like systems. - * - * See: http://man7.org/linux/man-pages/man2/shutdown.2.html */ - export enum ShutdownMode { - Read = 0, - Write, - ReadWrite, // TODO(ry) panics on ReadWrite. - } - - /** **UNSTABLE**: Both the `how` parameter and `ShutdownMode` enum are under - * consideration for removal. - * - * Shutdown socket send and receive operations. - * - * Matches behavior of POSIX shutdown(3). - * - * ```ts - * const listener = Deno.listen({ port: 80 }); - * const conn = await listener.accept(); - * Deno.shutdown(conn.rid, Deno.ShutdownMode.Write); - * ``` - */ - export function shutdown(rid: number, how: ShutdownMode): Promise<void>; - /** **UNSTABLE**: new API, yet to be vetted. * * A generic transport listener for message-oriented protocols. */ |