@php-wasm/node-8-2 3.0.43 → 3.0.45

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/jspi/php_8_2.js CHANGED
@@ -15,7 +15,7 @@ const currentDirPath =
15
15
  : path.dirname(fileURLToPath(import.meta.url));
16
16
  const dependencyFilename = path.join(currentDirPath, '8_2_30', 'php_8_2.wasm');
17
17
  export { dependencyFilename };
18
- export const dependenciesTotalSize = 26936464;
18
+ export const dependenciesTotalSize = 26936455;
19
19
  const phpVersionString = '8.2.30';
20
20
  export function init(RuntimeName, PHPLoader) {
21
21
  // The rest of the code comes from the built php.js file and esm-suffix.js
@@ -6380,185 +6380,17 @@ export function init(RuntimeName, PHPLoader) {
6380
6380
  }
6381
6381
  ___syscall_chmod.sig = 'ipi';
6382
6382
 
6383
- function ___syscall_connect(fd, addr, addrlen, d1, d2, d3) {
6384
- try {
6385
- var sock = getSocketFromFD(fd);
6386
- var info = getSocketAddress(addr, addrlen);
6387
- sock.sock_ops.connect(sock, info.addr, info.port);
6388
- return 0;
6389
- } catch (e) {
6390
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6391
- return -e.errno;
6392
- }
6393
- }
6394
- ___syscall_connect.sig = 'iippiii';
6395
-
6396
- function ___syscall_dup(fd) {
6397
- try {
6398
- var old = SYSCALLS.getStreamFromFD(fd);
6399
- return FS.dupStream(old).fd;
6400
- } catch (e) {
6401
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6402
- return -e.errno;
6403
- }
6404
- }
6405
- ___syscall_dup.sig = 'ii';
6406
-
6407
- function ___syscall_dup3(fd, newfd, flags) {
6408
- try {
6409
- var old = SYSCALLS.getStreamFromFD(fd);
6410
- if (old.fd === newfd) return -28;
6411
- // Check newfd is within range of valid open file descriptors.
6412
- if (newfd < 0 || newfd >= FS.MAX_OPEN_FDS) return -8;
6413
- var existing = FS.getStream(newfd);
6414
- if (existing) FS.close(existing);
6415
- return FS.dupStream(old, newfd).fd;
6416
- } catch (e) {
6417
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6418
- return -e.errno;
6419
- }
6420
- }
6421
- ___syscall_dup3.sig = 'iiii';
6422
-
6423
- function ___syscall_faccessat(dirfd, path, amode, flags) {
6424
- try {
6425
- path = SYSCALLS.getStr(path);
6426
- path = SYSCALLS.calculateAt(dirfd, path);
6427
- if (amode & ~7) {
6428
- // need a valid mode
6429
- return -28;
6430
- }
6431
- var lookup = FS.lookupPath(path, { follow: true });
6432
- var node = lookup.node;
6433
- if (!node) {
6434
- return -44;
6435
- }
6436
- var perms = '';
6437
- if (amode & 4) perms += 'r';
6438
- if (amode & 2) perms += 'w';
6439
- if (amode & 1) perms += 'x';
6440
- if (
6441
- perms /* otherwise, they've just passed F_OK */ &&
6442
- FS.nodePermissions(node, perms)
6443
- ) {
6444
- return -2;
6445
- }
6446
- return 0;
6447
- } catch (e) {
6448
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6449
- return -e.errno;
6450
- }
6451
- }
6452
- ___syscall_faccessat.sig = 'iipii';
6453
-
6454
- var ___syscall_fadvise64 = (fd, offset, len, advice) => 0;
6455
- ___syscall_fadvise64.sig = 'iijji';
6456
-
6457
- var INT53_MAX = 9007199254740992;
6458
-
6459
- var INT53_MIN = -9007199254740992;
6460
- var bigintToI53Checked = (num) =>
6461
- num < INT53_MIN || num > INT53_MAX ? NaN : Number(num);
6462
- function ___syscall_fallocate(fd, mode, offset, len) {
6463
- offset = bigintToI53Checked(offset);
6464
- len = bigintToI53Checked(len);
6465
-
6466
- try {
6467
- if (isNaN(offset) || isNaN(len)) return -61;
6468
- if (mode != 0) {
6469
- return -138;
6470
- }
6471
- if (offset < 0 || len < 0) {
6472
- return -28;
6473
- }
6474
- // We only support mode == 0, which means we can implement fallocate
6475
- // in terms of ftruncate.
6476
- var oldSize = FS.fstat(fd).size;
6477
- var newSize = offset + len;
6478
- if (newSize > oldSize) {
6479
- FS.ftruncate(fd, newSize);
6480
- }
6481
- return 0;
6482
- } catch (e) {
6483
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6484
- return -e.errno;
6485
- }
6486
- }
6487
- ___syscall_fallocate.sig = 'iiijj';
6488
-
6489
- function ___syscall_fchdir(fd) {
6490
- try {
6491
- var stream = SYSCALLS.getStreamFromFD(fd);
6492
- FS.chdir(stream.path);
6493
- return 0;
6494
- } catch (e) {
6495
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6496
- return -e.errno;
6497
- }
6498
- }
6499
- ___syscall_fchdir.sig = 'ii';
6500
-
6501
- function ___syscall_fchmod(fd, mode) {
6502
- try {
6503
- FS.fchmod(fd, mode);
6504
- return 0;
6505
- } catch (e) {
6506
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6507
- return -e.errno;
6508
- }
6509
- }
6510
- ___syscall_fchmod.sig = 'iii';
6511
-
6512
- function ___syscall_fchmodat2(dirfd, path, mode, flags) {
6513
- try {
6514
- var nofollow = flags & 256;
6515
- path = SYSCALLS.getStr(path);
6516
- path = SYSCALLS.calculateAt(dirfd, path);
6517
- FS.chmod(path, mode, nofollow);
6518
- return 0;
6519
- } catch (e) {
6520
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6521
- return -e.errno;
6522
- }
6523
- }
6524
- ___syscall_fchmodat2.sig = 'iipii';
6383
+ var allocateUTF8OnStack = (...args) => stringToUTF8OnStack(...args);
6525
6384
 
6526
- function ___syscall_fchown32(fd, owner, group) {
6527
- try {
6528
- FS.fchown(fd, owner, group);
6529
- return 0;
6530
- } catch (e) {
6531
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6532
- return -e.errno;
6533
- }
6385
+ function _js_getpid() {
6386
+ return PHPLoader.processId ?? 42;
6534
6387
  }
6535
- ___syscall_fchown32.sig = 'iiii';
6536
6388
 
6537
- function ___syscall_fchownat(dirfd, path, owner, group, flags) {
6538
- try {
6539
- path = SYSCALLS.getStr(path);
6540
- var nofollow = flags & 256;
6541
- flags = flags & ~256;
6542
- path = SYSCALLS.calculateAt(dirfd, path);
6543
- (nofollow ? FS.lchown : FS.chown)(path, owner, group);
6544
- return 0;
6545
- } catch (e) {
6546
- if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6547
- return -e.errno;
6389
+ function _js_wasm_trace(format, ...args) {
6390
+ if (PHPLoader.trace instanceof Function) {
6391
+ PHPLoader.trace(_js_getpid(), format, ...args);
6548
6392
  }
6549
6393
  }
6550
- ___syscall_fchownat.sig = 'iipiii';
6551
-
6552
- var syscallGetVarargI = () => {
6553
- // the `+` prepended here is necessary to convince the JSCompiler that varargs is indeed a number.
6554
- var ret = HEAP32[+SYSCALLS.varargs >> 2];
6555
- SYSCALLS.varargs += 4;
6556
- return ret;
6557
- };
6558
- var syscallGetVarargP = syscallGetVarargI;
6559
-
6560
- var allocateUTF8OnStack = (...args) => stringToUTF8OnStack(...args);
6561
-
6562
6394
  var PHPWASM = {
6563
6395
  O_APPEND: 1024,
6564
6396
  O_NONBLOCK: 2048,
@@ -6896,15 +6728,284 @@ export function init(RuntimeName, PHPLoader) {
6896
6728
  },
6897
6729
  };
6898
6730
 
6899
- function _js_getpid() {
6900
- return PHPLoader.processId ?? 42;
6731
+ var _wasm_connect = function (sockfd, addr, addrlen) {
6732
+ return Asyncify.handleSleep((wakeUp) => {
6733
+ // Get the socket
6734
+ let sock;
6735
+ try {
6736
+ sock = getSocketFromFD(sockfd);
6737
+ } catch (e) {
6738
+ wakeUp(-ERRNO_CODES.EBADF); // EBADF
6739
+ return;
6740
+ }
6741
+
6742
+ if (!sock) {
6743
+ wakeUp(-ERRNO_CODES.EBADF); // EBADF
6744
+ return;
6745
+ }
6746
+
6747
+ // Parse the address
6748
+ let info;
6749
+ try {
6750
+ info = getSocketAddress(addr, addrlen);
6751
+ } catch (e) {
6752
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) {
6753
+ wakeUp(-ERRNO_CODES.EFAULT); // EFAULT
6754
+ return;
6755
+ }
6756
+ wakeUp(-e.errno);
6757
+ return;
6758
+ }
6759
+
6760
+ // Perform the connect (this creates the WebSocket but doesn't wait)
6761
+ try {
6762
+ sock.sock_ops.connect(sock, info.addr, info.port);
6763
+ } catch (e) {
6764
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) {
6765
+ wakeUp(-ERRNO_CODES.ECONNREFUSED);
6766
+ return;
6767
+ }
6768
+ wakeUp(-e.errno);
6769
+ return;
6770
+ }
6771
+
6772
+ // Get all websockets for this socket
6773
+ const webSockets = PHPWASM.getAllWebSockets(sock);
6774
+ if (!webSockets.length) {
6775
+ // No WebSocket yet, this shouldn't happen after connect
6776
+ wakeUp(-ERRNO_CODES.ECONNREFUSED);
6777
+ return;
6778
+ }
6779
+
6780
+ const ws = webSockets[0];
6781
+
6782
+ // If already connected, return success
6783
+ if (ws.readyState === ws.OPEN) {
6784
+ wakeUp(0);
6785
+ return;
6786
+ }
6787
+
6788
+ // If already closed or closing, return error
6789
+ if (ws.readyState === ws.CLOSING || ws.readyState === ws.CLOSED) {
6790
+ wakeUp(-ERRNO_CODES.ECONNREFUSED);
6791
+ return;
6792
+ }
6793
+
6794
+ // Wait for the connection to be established
6795
+ const timeout = 30000; // 30 second timeout
6796
+ let resolved = false;
6797
+
6798
+ const timeoutId = setTimeout(() => {
6799
+ if (!resolved) {
6800
+ resolved = true;
6801
+ wakeUp(-ERRNO_CODES.ETIMEDOUT);
6802
+ }
6803
+ }, timeout);
6804
+
6805
+ const handleOpen = () => {
6806
+ if (!resolved) {
6807
+ resolved = true;
6808
+ clearTimeout(timeoutId);
6809
+ ws.removeEventListener('error', handleError);
6810
+ ws.removeEventListener('close', handleClose);
6811
+ wakeUp(0);
6812
+ }
6813
+ };
6814
+
6815
+ const handleError = () => {
6816
+ if (!resolved) {
6817
+ resolved = true;
6818
+ clearTimeout(timeoutId);
6819
+ ws.removeEventListener('open', handleOpen);
6820
+ ws.removeEventListener('close', handleClose);
6821
+ wakeUp(-ERRNO_CODES.ECONNREFUSED);
6822
+ }
6823
+ };
6824
+
6825
+ const handleClose = () => {
6826
+ if (!resolved) {
6827
+ resolved = true;
6828
+ clearTimeout(timeoutId);
6829
+ ws.removeEventListener('open', handleOpen);
6830
+ ws.removeEventListener('error', handleError);
6831
+ wakeUp(-ERRNO_CODES.ECONNREFUSED);
6832
+ }
6833
+ };
6834
+
6835
+ ws.addEventListener('open', handleOpen);
6836
+ ws.addEventListener('error', handleError);
6837
+ ws.addEventListener('close', handleClose);
6838
+ });
6839
+ };
6840
+
6841
+ function ___syscall_connect(sockfd, addr, addrlen, d1, d2, d3) {
6842
+ return _wasm_connect(sockfd, addr, addrlen);
6901
6843
  }
6844
+ ___syscall_connect.sig = 'iippiii';
6902
6845
 
6903
- function _js_wasm_trace(format, ...args) {
6904
- if (PHPLoader.trace instanceof Function) {
6905
- PHPLoader.trace(_js_getpid(), format, ...args);
6846
+ function ___syscall_dup(fd) {
6847
+ try {
6848
+ var old = SYSCALLS.getStreamFromFD(fd);
6849
+ return FS.dupStream(old).fd;
6850
+ } catch (e) {
6851
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6852
+ return -e.errno;
6853
+ }
6854
+ }
6855
+ ___syscall_dup.sig = 'ii';
6856
+
6857
+ function ___syscall_dup3(fd, newfd, flags) {
6858
+ try {
6859
+ var old = SYSCALLS.getStreamFromFD(fd);
6860
+ if (old.fd === newfd) return -28;
6861
+ // Check newfd is within range of valid open file descriptors.
6862
+ if (newfd < 0 || newfd >= FS.MAX_OPEN_FDS) return -8;
6863
+ var existing = FS.getStream(newfd);
6864
+ if (existing) FS.close(existing);
6865
+ return FS.dupStream(old, newfd).fd;
6866
+ } catch (e) {
6867
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6868
+ return -e.errno;
6869
+ }
6870
+ }
6871
+ ___syscall_dup3.sig = 'iiii';
6872
+
6873
+ function ___syscall_faccessat(dirfd, path, amode, flags) {
6874
+ try {
6875
+ path = SYSCALLS.getStr(path);
6876
+ path = SYSCALLS.calculateAt(dirfd, path);
6877
+ if (amode & ~7) {
6878
+ // need a valid mode
6879
+ return -28;
6880
+ }
6881
+ var lookup = FS.lookupPath(path, { follow: true });
6882
+ var node = lookup.node;
6883
+ if (!node) {
6884
+ return -44;
6885
+ }
6886
+ var perms = '';
6887
+ if (amode & 4) perms += 'r';
6888
+ if (amode & 2) perms += 'w';
6889
+ if (amode & 1) perms += 'x';
6890
+ if (
6891
+ perms /* otherwise, they've just passed F_OK */ &&
6892
+ FS.nodePermissions(node, perms)
6893
+ ) {
6894
+ return -2;
6895
+ }
6896
+ return 0;
6897
+ } catch (e) {
6898
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6899
+ return -e.errno;
6900
+ }
6901
+ }
6902
+ ___syscall_faccessat.sig = 'iipii';
6903
+
6904
+ var ___syscall_fadvise64 = (fd, offset, len, advice) => 0;
6905
+ ___syscall_fadvise64.sig = 'iijji';
6906
+
6907
+ var INT53_MAX = 9007199254740992;
6908
+
6909
+ var INT53_MIN = -9007199254740992;
6910
+ var bigintToI53Checked = (num) =>
6911
+ num < INT53_MIN || num > INT53_MAX ? NaN : Number(num);
6912
+ function ___syscall_fallocate(fd, mode, offset, len) {
6913
+ offset = bigintToI53Checked(offset);
6914
+ len = bigintToI53Checked(len);
6915
+
6916
+ try {
6917
+ if (isNaN(offset) || isNaN(len)) return -61;
6918
+ if (mode != 0) {
6919
+ return -138;
6920
+ }
6921
+ if (offset < 0 || len < 0) {
6922
+ return -28;
6923
+ }
6924
+ // We only support mode == 0, which means we can implement fallocate
6925
+ // in terms of ftruncate.
6926
+ var oldSize = FS.fstat(fd).size;
6927
+ var newSize = offset + len;
6928
+ if (newSize > oldSize) {
6929
+ FS.ftruncate(fd, newSize);
6930
+ }
6931
+ return 0;
6932
+ } catch (e) {
6933
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6934
+ return -e.errno;
6906
6935
  }
6907
6936
  }
6937
+ ___syscall_fallocate.sig = 'iiijj';
6938
+
6939
+ function ___syscall_fchdir(fd) {
6940
+ try {
6941
+ var stream = SYSCALLS.getStreamFromFD(fd);
6942
+ FS.chdir(stream.path);
6943
+ return 0;
6944
+ } catch (e) {
6945
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6946
+ return -e.errno;
6947
+ }
6948
+ }
6949
+ ___syscall_fchdir.sig = 'ii';
6950
+
6951
+ function ___syscall_fchmod(fd, mode) {
6952
+ try {
6953
+ FS.fchmod(fd, mode);
6954
+ return 0;
6955
+ } catch (e) {
6956
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6957
+ return -e.errno;
6958
+ }
6959
+ }
6960
+ ___syscall_fchmod.sig = 'iii';
6961
+
6962
+ function ___syscall_fchmodat2(dirfd, path, mode, flags) {
6963
+ try {
6964
+ var nofollow = flags & 256;
6965
+ path = SYSCALLS.getStr(path);
6966
+ path = SYSCALLS.calculateAt(dirfd, path);
6967
+ FS.chmod(path, mode, nofollow);
6968
+ return 0;
6969
+ } catch (e) {
6970
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6971
+ return -e.errno;
6972
+ }
6973
+ }
6974
+ ___syscall_fchmodat2.sig = 'iipii';
6975
+
6976
+ function ___syscall_fchown32(fd, owner, group) {
6977
+ try {
6978
+ FS.fchown(fd, owner, group);
6979
+ return 0;
6980
+ } catch (e) {
6981
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6982
+ return -e.errno;
6983
+ }
6984
+ }
6985
+ ___syscall_fchown32.sig = 'iiii';
6986
+
6987
+ function ___syscall_fchownat(dirfd, path, owner, group, flags) {
6988
+ try {
6989
+ path = SYSCALLS.getStr(path);
6990
+ var nofollow = flags & 256;
6991
+ flags = flags & ~256;
6992
+ path = SYSCALLS.calculateAt(dirfd, path);
6993
+ (nofollow ? FS.lchown : FS.chown)(path, owner, group);
6994
+ return 0;
6995
+ } catch (e) {
6996
+ if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
6997
+ return -e.errno;
6998
+ }
6999
+ }
7000
+ ___syscall_fchownat.sig = 'iipiii';
7001
+
7002
+ var syscallGetVarargI = () => {
7003
+ // the `+` prepended here is necessary to convince the JSCompiler that varargs is indeed a number.
7004
+ var ret = HEAP32[+SYSCALLS.varargs >> 2];
7005
+ SYSCALLS.varargs += 4;
7006
+ return ret;
7007
+ };
7008
+ var syscallGetVarargP = syscallGetVarargI;
6908
7009
 
6909
7010
  var _fd_close = function fd_close(fd) {
6910
7011
  return Asyncify.handleAsync(async () => {
@@ -17981,17 +18082,34 @@ export function init(RuntimeName, PHPLoader) {
17981
18082
  const optionValue = HEAPU8[optionValuePtr];
17982
18083
  const SOL_SOCKET = 1;
17983
18084
  const SO_KEEPALIVE = 9;
18085
+ const SO_RCVTIMEO = 66;
18086
+ const SO_SNDTIMEO = 67;
17984
18087
  const IPPROTO_TCP = 6;
17985
18088
  const TCP_NODELAY = 1;
17986
- const isSupported =
18089
+
18090
+ // Options that we can forward to the WebSocket proxy
18091
+ const isForwardable =
17987
18092
  (level === SOL_SOCKET && optionName === SO_KEEPALIVE) ||
17988
18093
  (level === IPPROTO_TCP && optionName === TCP_NODELAY);
17989
- if (!isSupported) {
18094
+
18095
+ // Options that we acknowledge but don't actually implement
18096
+ // (WebSocket connections handle timeouts differently)
18097
+ const isIgnorable =
18098
+ level === SOL_SOCKET &&
18099
+ (optionName === SO_RCVTIMEO || optionName === SO_SNDTIMEO);
18100
+
18101
+ if (!isForwardable && !isIgnorable) {
17990
18102
  console.warn(
17991
18103
  `Unsupported socket option: ${level}, ${optionName}, ${optionValue}`
17992
18104
  );
17993
18105
  return -1;
17994
18106
  }
18107
+
18108
+ // For ignorable options, just return success
18109
+ if (isIgnorable) {
18110
+ return 0;
18111
+ }
18112
+
17995
18113
  const ws = PHPWASM.getAllWebSockets(socketd)[0];
17996
18114
  if (!ws) {
17997
18115
  return -1;
@@ -18015,7 +18133,7 @@ export function init(RuntimeName, PHPLoader) {
18015
18133
  var Asyncify = {
18016
18134
  instrumentWasmImports(imports) {
18017
18135
  var importPattern =
18018
- /^(js_open_process|js_fd_read|js_waitpid|js_process_status|js_create_input_device|wasm_setsockopt|wasm_shutdown|wasm_close|wasm_recv|__syscall_fcntl64|js_flock|js_release_file_locks|js_waitpid|invoke_.*|__asyncjs__.*)$/;
18136
+ /^(js_open_process|js_fd_read|js_waitpid|js_process_status|js_create_input_device|wasm_setsockopt|wasm_shutdown|wasm_close|wasm_recv|wasm_connect|recv|setsockopt|__syscall_fcntl64|js_flock|js_release_file_locks|js_waitpid|invoke_.*|__asyncjs__.*)$/;
18019
18137
 
18020
18138
  for (let [x, original] of Object.entries(imports)) {
18021
18139
  if (typeof original == 'function') {
@@ -18039,7 +18157,7 @@ export function init(RuntimeName, PHPLoader) {
18039
18157
  },
18040
18158
  instrumentWasmExports(exports) {
18041
18159
  var exportPattern =
18042
- /^(php_wasm_init|wasm_sleep|wasm_read|emscripten_sleep|wasm_sapi_handle_request|wasm_sapi_request_shutdown|wasm_poll_socket|wrap_select|__wrap_select|select|php_pollfd_for|fflush|wasm_popen|wasm_read|wasm_php_exec|run_cli|wasm_recv|__wasm_call_ctors|__errno_location|__funcs_on_exit|main|__main_argc_argv)$/;
18160
+ /^(php_wasm_init|wasm_sleep|wasm_read|emscripten_sleep|wasm_sapi_handle_request|wasm_sapi_request_shutdown|wasm_poll_socket|wrap_select|__wrap_select|select|php_pollfd_for|fflush|wasm_popen|wasm_read|wasm_php_exec|run_cli|wasm_recv|wasm_connect|recv|setsockopt|__wasm_call_ctors|__errno_location|__funcs_on_exit|main|__main_argc_argv)$/;
18043
18161
  Asyncify.asyncExports = new Set();
18044
18162
  var ret = {};
18045
18163
  for (let [x, original] of Object.entries(exports)) {
@@ -30524,6 +30642,26 @@ export function init(RuntimeName, PHPLoader) {
30524
30642
  });
30525
30643
  };
30526
30644
 
30645
+ function _recv(sockfd, buffer, size, flags) {
30646
+ return _wasm_recv(sockfd, buffer, size, flags);
30647
+ }
30648
+
30649
+ function _setsockopt(
30650
+ socketd,
30651
+ level,
30652
+ optionName,
30653
+ optionValuePtr,
30654
+ optionLen
30655
+ ) {
30656
+ return _wasm_setsockopt(
30657
+ socketd,
30658
+ level,
30659
+ optionName,
30660
+ optionValuePtr,
30661
+ optionLen
30662
+ );
30663
+ }
30664
+
30527
30665
  var webSockets = new HandleAllocator();
30528
30666
 
30529
30667
  var WS = {
@@ -30971,6 +31109,8 @@ export function init(RuntimeName, PHPLoader) {
30971
31109
  Module['__Unwind_DeleteException'] = __Unwind_DeleteException;
30972
31110
  Module['_sched_yield'] = _sched_yield;
30973
31111
  Module['___syscall_shutdown'] = ___syscall_shutdown;
31112
+ Module['_recv'] = _recv;
31113
+ Module['_setsockopt'] = _setsockopt;
30974
31114
  // End JS library exports
30975
31115
 
30976
31116
  // end include: postlibrary.js
@@ -33943,9 +34083,15 @@ export function init(RuntimeName, PHPLoader) {
33943
34083
  /** @export */
33944
34084
  wasm_close: _wasm_close,
33945
34085
  /** @export */
34086
+ wasm_connect: _wasm_connect,
34087
+ /** @export */
33946
34088
  wasm_recv: _wasm_recv,
34089
+ /** */
34090
+ recv: _recv,
33947
34091
  /** @export */
33948
34092
  wasm_setsockopt: _wasm_setsockopt,
34093
+ /** */
34094
+ setsockopt: _setsockopt,
33949
34095
  /** @export */
33950
34096
  wasm_shutdown: _wasm_shutdown,
33951
34097
  /** @export */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/node-8-2",
3
- "version": "3.0.43",
3
+ "version": "3.0.45",
4
4
  "description": "PHP 8.2 WebAssembly binaries for node",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,12 +35,12 @@
35
35
  "node": ">=20.18.3",
36
36
  "npm": ">=10.1.0"
37
37
  },
38
- "gitHead": "a73661b5ec1f5d4bd2b1cd29789625d80561ff85",
38
+ "gitHead": "90da64a5068b13069ea9faf8ff9f5b1e36fd6099",
39
39
  "dependencies": {
40
40
  "ini": "4.1.2",
41
41
  "wasm-feature-detect": "1.8.0",
42
42
  "ws": "8.18.3",
43
- "@php-wasm/universal": "3.0.43"
43
+ "@php-wasm/universal": "3.0.45"
44
44
  },
45
45
  "packageManager": "npm@10.9.2",
46
46
  "overrides": {