diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-08-31 09:46:02 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-31 09:46:02 +1000 |
commit | a527b3a5de86d8753f7881faff694fbe3797d93d (patch) | |
tree | cf68730a855b3a0a6115d3b285954aac332c7fcd /ext/net | |
parent | 8e478a1a7db9a5c4e773e52f9c4a732793145ce7 (diff) |
chore(net): remove `Deno.shutdown()` (#25253)
Diffstat (limited to 'ext/net')
-rw-r--r-- | ext/net/01_net.js | 7 | ||||
-rw-r--r-- | ext/net/lib.deno_net.d.ts | 18 |
2 files changed, 1 insertions, 24 deletions
diff --git a/ext/net/01_net.js b/ext/net/01_net.js index a41a27543..87bbcd476 100644 --- a/ext/net/01_net.js +++ b/ext/net/01_net.js @@ -63,10 +63,6 @@ async function write(rid, data) { return await core.write(rid, data); } -function shutdown(rid) { - return core.shutdown(rid); -} - async function resolveDns(query, recordType, options) { let cancelRid; let abortHandler; @@ -164,7 +160,7 @@ class Conn { } closeWrite() { - return shutdown(this.#rid); + return core.shutdown(this.#rid); } get readable() { @@ -647,7 +643,6 @@ export { Listener, listenOptionApiName, resolveDns, - shutdown, TcpConn, UnixConn, validatePort, diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts index 13fbd3514..382a3ab8d 100644 --- a/ext/net/lib.deno_net.d.ts +++ b/ext/net/lib.deno_net.d.ts @@ -528,22 +528,4 @@ declare namespace Deno { conn: TcpConn, options?: StartTlsOptions, ): Promise<TlsConn>; - - /** 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); - * ``` - * - * @deprecated This will be removed in Deno 2.0. See the - * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide} - * for migration instructions. - * - * @category Network - */ - export function shutdown(rid: number): Promise<void>; } |