aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-11 20:20:31 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-11 20:21:41 -0800
commit79707042228760b0413df1b32d38c67c904a08b1 (patch)
tree410267e1bac510264be67ae6eb68a1882c3b8e38
parentced3226ffbeab59d647bb7e44a5aeecbc4c0d1df (diff)
downloadbun-79707042228760b0413df1b32d38c67c904a08b1.tar.gz
bun-79707042228760b0413df1b32d38c67c904a08b1.tar.zst
bun-79707042228760b0413df1b32d38c67c904a08b1.zip
`end` callback
-rw-r--r--packages/bun-types/bun.d.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts
index 1b5ec60ba..1df382a0a 100644
--- a/packages/bun-types/bun.d.ts
+++ b/packages/bun-types/bun.d.ts
@@ -2753,6 +2753,12 @@ declare module "bun" {
drain?(socket: Socket<Data>): void | Promise<void>;
/**
+ * When the socket has been shutdown from the other end, this function is
+ * called. This is a TCP FIN packet.
+ */
+ end?(socket: Socket<Data>): void | Promise<void>;
+
+ /**
* When the socket fails to be created, this function is called.
*
* The promise returned by `Bun.connect` rejects **after** this function is