@freqhole/midden 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/midden.d.ts +9 -0
- package/midden_bg.js +16 -7
- package/midden_bg.wasm +0 -0
- package/package.json +1 -1
package/midden.d.ts
CHANGED
|
@@ -18,6 +18,15 @@ export type ReadableStreamType = "bytes";
|
|
|
18
18
|
* the send and recv halves use RefCell<Option<...>> so that async read
|
|
19
19
|
* and write operations can proceed concurrently (safe because WASM is
|
|
20
20
|
* single-threaded).
|
|
21
|
+
*
|
|
22
|
+
* also holds the parent `Connection` handle, purely to keep the QUIC
|
|
23
|
+
* connection alive for as long as this stream is alive: iroh/quinn tears
|
|
24
|
+
* a connection down once its last `Connection` handle is dropped, and
|
|
25
|
+
* neither `accept()` nor `open_bi()` keep any other handle around after
|
|
26
|
+
* handing a `BiStream` to JS. without this field, the connection was
|
|
27
|
+
* dropped (and the peer's in-flight read failed with "connection lost")
|
|
28
|
+
* the moment `accept()`/`open_bi()` returned - often before a response
|
|
29
|
+
* written moments later on the same stream even finished flushing.
|
|
21
30
|
*/
|
|
22
31
|
export class BiStream {
|
|
23
32
|
private constructor();
|
package/midden_bg.js
CHANGED
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
* the send and recv halves use RefCell<Option<...>> so that async read
|
|
9
9
|
* and write operations can proceed concurrently (safe because WASM is
|
|
10
10
|
* single-threaded).
|
|
11
|
+
*
|
|
12
|
+
* also holds the parent `Connection` handle, purely to keep the QUIC
|
|
13
|
+
* connection alive for as long as this stream is alive: iroh/quinn tears
|
|
14
|
+
* a connection down once its last `Connection` handle is dropped, and
|
|
15
|
+
* neither `accept()` nor `open_bi()` keep any other handle around after
|
|
16
|
+
* handing a `BiStream` to JS. without this field, the connection was
|
|
17
|
+
* dropped (and the peer's in-flight read failed with "connection lost")
|
|
18
|
+
* the moment `accept()`/`open_bi()` returned - often before a response
|
|
19
|
+
* written moments later on the same stream even finished flushing.
|
|
11
20
|
*/
|
|
12
21
|
export class BiStream {
|
|
13
22
|
static __wrap(ptr) {
|
|
@@ -2097,37 +2106,37 @@ export function __wbg_write_e557b5312ec23477() { return handleError(function (ar
|
|
|
2097
2106
|
return ret;
|
|
2098
2107
|
}, arguments); }
|
|
2099
2108
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
2100
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
2109
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3531, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2101
2110
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_);
|
|
2102
2111
|
return ret;
|
|
2103
2112
|
}
|
|
2104
2113
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
2105
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
2114
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5577, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
2106
2115
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_);
|
|
2107
2116
|
return ret;
|
|
2108
2117
|
}
|
|
2109
2118
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
2110
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
2119
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 2809, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2111
2120
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_);
|
|
2112
2121
|
return ret;
|
|
2113
2122
|
}
|
|
2114
2123
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
2115
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
2124
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 4162, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2116
2125
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_);
|
|
2117
2126
|
return ret;
|
|
2118
2127
|
}
|
|
2119
2128
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
2120
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
2129
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3450, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2121
2130
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_);
|
|
2122
2131
|
return ret;
|
|
2123
2132
|
}
|
|
2124
2133
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
2125
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
2134
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3704, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
2126
2135
|
const ret = makeClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_);
|
|
2127
2136
|
return ret;
|
|
2128
2137
|
}
|
|
2129
2138
|
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
2130
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
2139
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5541, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2131
2140
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_);
|
|
2132
2141
|
return ret;
|
|
2133
2142
|
}
|
package/midden_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED