We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In case it helps improving the WASM port, I was able to perform a simple socket connection following these steps:
blink.c
#ifdef __EMSCRIPTEN__ #include <emscripten.h> #include <emscripten/websocket.h> #include <emscripten/threading.h> #include <emscripten/posix_socket.h> static EMSCRIPTEN_WEBSOCKET_T bridgeSocket = 0; #endif
int main(int argc, char *argv[]) { #ifdef __EMSCRIPTEN__ if (!bridgeSocket) { bridgeSocket = emscripten_init_websocket_to_posix_socket_bridge("ws://localhost:8080"); // Synchronously wait until connection has been established. uint16_t readyState = 0; do { emscripten_websocket_get_ready_state(bridgeSocket, &readyState); emscripten_thread_sleep(100); } while (readyState == 0); } #endif ....
-lwebsocket.js -sPROXY_POSIX_SOCKETS -sUSE_PTHREADS -sPROXY_TO_PTHREAD
./websocket_to_posix_proxy 8080
The text was updated successfully, but these errors were encountered:
#22
Sorry, something went wrong.
No branches or pull requests
In case it helps improving the WASM port, I was able to perform a simple socket connection following these steps:
blink.c
; reference-lwebsocket.js -sPROXY_POSIX_SOCKETS -sUSE_PTHREADS -sPROXY_TO_PTHREAD
referenceThe text was updated successfully, but these errors were encountered: