From c50600d65e1876d2e64b0cd73814ab6c9a98e233 Mon Sep 17 00:00:00 2001
From: James Sturtevant
Date: Wed, 19 Feb 2025 23:46:28 +0000
Subject: [PATCH 1/2] Add close function that allows for cleaning closing tls
connection
Signed-off-by: James Sturtevant
---
imports.md | 12 ++++++++++++
wit/types.wit | 4 ++++
2 files changed, 16 insertions(+)
diff --git a/imports.md b/imports.md
index 84c8737..01371bd 100644
--- a/imports.md
+++ b/imports.md
@@ -437,6 +437,9 @@ is ready for reading, before performing the splice.
#### `type pollable`
[`pollable`](#pollable)
+#### `type io-error`
+[`error`](#error)
+
#### `resource client-handshake`
resource client-connection
resource future-client-streams
@@ -462,6 +465,15 @@ is ready for reading, before performing the splice.
+[method]client-connection.close-notify: func
+Params
+
+Return values
+
[method]future-client-streams.subscribe: func
Params
diff --git a/wit/types.wit b/wit/types.wit
index fd7f7a7..ac08c11 100644
--- a/wit/types.wit
+++ b/wit/types.wit
@@ -4,6 +4,8 @@ interface types {
use wasi:io/streams@0.2.3.{input-stream, output-stream};
@unstable(feature = tls)
use wasi:io/poll@0.2.3.{pollable};
+ @unstable(feature = tls)
+ use wasi:io/error@0.2.3.{error as io-error};
@unstable(feature = tls)
resource client-handshake {
@@ -16,6 +18,8 @@ interface types {
@unstable(feature = tls)
resource client-connection {
+ @unstable(feature = tls)
+ close-notify: func() -> option>;
}
@unstable(feature = tls)
From eb87a82e457adaea01b0f0402715e99e1d27f194 Mon Sep 17 00:00:00 2001
From: James Sturtevant
Date: Tue, 4 Mar 2025 20:35:42 +0000
Subject: [PATCH 2/2] Simplify the api
Signed-off-by: James Sturtevant
---
imports.md | 11 ++---------
wit/types.wit | 4 +---
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/imports.md b/imports.md
index 01371bd..48c466d 100644
--- a/imports.md
+++ b/imports.md
@@ -437,9 +437,6 @@ is ready for reading, before performing the splice.
#### `type pollable`
[`pollable`](#pollable)
-#### `type io-error`
-[`error`](#error)
-
#### `resource client-handshake`
resource client-connection
resource future-client-streams
@@ -465,14 +462,10 @@ is ready for reading, before performing the splice.
-[method]client-connection.close-notify: func
+[method]client-connection.close-output: func
Params
-Return values
-
[method]future-client-streams.subscribe: func
Params
diff --git a/wit/types.wit b/wit/types.wit
index ac08c11..ee8a847 100644
--- a/wit/types.wit
+++ b/wit/types.wit
@@ -4,8 +4,6 @@ interface types {
use wasi:io/streams@0.2.3.{input-stream, output-stream};
@unstable(feature = tls)
use wasi:io/poll@0.2.3.{pollable};
- @unstable(feature = tls)
- use wasi:io/error@0.2.3.{error as io-error};
@unstable(feature = tls)
resource client-handshake {
@@ -19,7 +17,7 @@ interface types {
@unstable(feature = tls)
resource client-connection {
@unstable(feature = tls)
- close-notify: func() -> option>;
+ close-output: func();
}
@unstable(feature = tls)