2d9f8f45be
...see
<https://emscripten.org/docs/porting/networking.html#full-posix-sockets-over-websocket-proxy-server>.
This requires
<4aff1f28b8
>
"-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
20 lines
556 B
Text
20 lines
556 B
Text
--- 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 */
|