@ai-ecoverse/slicc-kernel 1.40.1 → 1.41.0
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/dist/process-worker.js
CHANGED
|
@@ -7100,6 +7100,18 @@ function wasixSocketImports(host, preview1) {
|
|
|
7100
7100
|
fds.adopt(fd, "socket", false);
|
|
7101
7101
|
mem.view().setUint32(out, fd, true);
|
|
7102
7102
|
},
|
|
7103
|
+
sock_pair: (af, type, _proto, out1, out2) => {
|
|
7104
|
+
if (af !== UNIX)
|
|
7105
|
+
throw new WasiError(af === INET4 || af === INET6 ? "EOPNOTSUPP" : "EAFNOSUPPORT");
|
|
7106
|
+
if (type !== STREAM) throw new WasiError("EPROTONOSUPPORT");
|
|
7107
|
+
mem.view().setUint32(out1, 0, true);
|
|
7108
|
+
mem.view().setUint32(out2, 0, true);
|
|
7109
|
+
const [a, b] = call2({ op: "sock-pair", domain: "unix" });
|
|
7110
|
+
fds.adopt(a, "socket", false);
|
|
7111
|
+
fds.adopt(b, "socket", false);
|
|
7112
|
+
mem.view().setUint32(out1, a, true);
|
|
7113
|
+
mem.view().setUint32(out2, b, true);
|
|
7114
|
+
},
|
|
7103
7115
|
sock_bind: (fd, addr) => {
|
|
7104
7116
|
socket(fd);
|
|
7105
7117
|
call2({ op: "sock-bind", fd, addr: readAddr(mem.view(), addr) });
|