-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
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
sockets support in emscripten #6347
Comments
BTW, I noticed there are tests for simple client-server under: I compiled both client and server:
but for the client when I run:
and nothing is being sent, not even SYN packet (I recorded on loopback interface) and for the server when I run:
which sounds legit cause there is no listen for javascript. So, how should I make it work? And of course, when I'm compiling with gcc, everything work just perfect |
Do they pass when running in the test suite? |
BUT, I succeed! Apparently what was missing for me was to install ws library for nodejs... Now, the client is sending traffic but the server crushes:
and the wireshark shows:
Any explanation? |
Hi,
I'm trying to write a simple client-server app in c/c++ and compile it to javascript using emscripten.
I read a lot about sockets in emscripten and I have to admit, there is a big mess!
Can please someone clarify the situation?
I understand that javascript language doesn't allow to use raw sockets and requires us to work with either HTTP or WebSocket.
So if I will write code in c/c++ that uses 'connect', 'listen' (for raw sockets) and will try to compile it using emscripten, it won't work, right? (already tried but just want to verify)
And what if I will write code in c/c++ that uses WebSocket library and will try to compile it using emscripten, I guess it won't work as well because WebSocket library internally uses raw sockets.
So, I'm wondering how should it be done? Do I need to write a pure javascript code for that mission?
Thanks,
Dudi
The text was updated successfully, but these errors were encountered: