Hi all,

I'm experimenting with porting a C++ library into the Emscripten 
environment.  One thing this library does is inter-thread communication via 
socket-pairs (as created by socketpair(), or as a fallback, by connecting 
two TCP sockets together).  For example, a parent thread might hold one 
socket of the socket-pair, while the child-thread watches the other socket 
(while blocking inside select()).  Then, when the parent wants the child 
thread to wake up and exit, all it has to do is close its socket, and the 
child thread will immediately return from select(), see that the connection 
is closed, and exit.

That works fine while running natively, but doesn't seem to work under 
Emscripten.  In particular, the call to setsocketpair() causes an assertion 
failure ("call not supported"), and the TCP-based fallback mechanism 
doesn't work either (presumably because the JavaScript environment doesn't 
allow a script to create TCP-accepting sockets?).

My question is, is socketpair() a call that can be supported under 
Emscripten?  Or am I crazy for expecting this sort of thing to work under 
Emscripten in the first place?

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/30377deb-ebc1-4977-b15e-f19a29a248d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to