summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts18
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;