Hi all,

I have some questions about socket testcase in emscripten/tests/sockets/ 
folder.

There is a socket echo client/sever test case.(*test_sockets_echo_client.c*  
*+ test_sockets_echo_server.c*)

and I found that there is a flag "USE_UDP" in code section.
---------------------------------------------------------------------------
#if !USE_UDP
  server.fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
#else
  server.fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
#endif
----------------------------------------------------------------------------
So I want to check the difference between TCP&UDP after emcc compiled.

*# emcc -DUSE_UDP test_sockets_echo_client.c -o test_UDP.js*


*# emcc test_sockets_echo_client.c -o test_TCP.js# diff test_UDP.js 
test_TCP.js*6337c6337
<  var $7=_socket(2,2,17);
---
>  var $7=_socket(2,1,6);
9744c9744
< //@ sourceMappingURL=test_UDP.js.map
----
> //@ sourceMappingURL=test_TCP.js.map

I find that both compiled js use websocket, but in my understanding 
websocket is based on TCP.

So there is no difference between tcp/udp after emcc compiled??

and I saw some previous topics in this group and there is "webrtc" baesd on 
tcp&udp,

but how can emcc compile udp to js using webrtc?

thanks.


-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to