...see <https://emscripten.org/docs/porting/networking.html#full-posix-sockets-over-websocket-proxy-server>. This requires <https://github.com/stbergmann/emscripten/commit/4aff1f28b88480791236adcc6d5cb2d919ad4bf3> "-sPROXY_POSIX_SOCKETS: Add websocket_proxy_poll". When configured with --disable-socketpair (which appears to have no negative consequences), external/curl appears to only call poll(2) with socket-related file descriptors, so we can use websocket_proxy_poll instead. The URL on which the websocket_to_posix_proxy process listens must be specified as Module.uno_websocket_to_posix_socket_url. Change-Id: I4ad23098b5bbc0646fa50859c0aeb9870d1cc92a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172243 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
21 lines
556 B
Plaintext
21 lines
556 B
Plaintext
--- lib/select.c
|
|
+++ lib/select.c
|
|
@@ -51,6 +51,8 @@
|
|
#include "curl_printf.h"
|
|
#include "curl_memory.h"
|
|
#include "memdebug.h"
|
|
+
|
|
+int websocket_proxy_poll(struct pollfd *fds, nfds_t nfds, int timeout);
|
|
|
|
/*
|
|
* Internal function used for waiting a specific amount of ms
|
|
@@ -318,7 +320,7 @@
|
|
pending_ms = -1;
|
|
else
|
|
pending_ms = 0;
|
|
- r = poll(ufds, nfds, pending_ms);
|
|
+ r = websocket_proxy_poll(ufds, nfds, pending_ms);
|
|
if(r <= 0) {
|
|
if((r == -1) && (SOCKERRNO == EINTR))
|
|
/* make EINTR from select or poll not a "lethal" error */
|