Thanks for the clarification. After some more pondering on my side I also 
think it's better to not rely on the implicit message framing in the 
underlying WebSocket (which would mean 2 different code paths for native vs 
browser) and instead add my own message framing on top of it, but with the 
advantage of more shared code between the platforms.

Am Mittwoch, 6. September 2017 00:25:37 UTC+8 schrieb jj:
>
> 2017-09-01 6:30 GMT+03:00 Floh <[email protected] <javascript:>>: 
> > I have a question on emscripten's socket wrapper API behaviour for TCP 
> > sockets when doing send/recv: 
> > 
> > Does one call socket send() call result in exactly one websocket send() 
> call 
> > with the same data (so that I can do one send() per message, and the 
> message 
> > arrives intact at the other side's recv)? 
>
> Currently that does. I can't think of an immediate reason to change 
> why this guarantee could not hold in the future, but if it ends up not 
> being the case, I think it is worthwhile to have a build option to 
> ensure it. However relying on this kind of behavior would be 
> unportable compared to native, so useful mostly for Emscripten builds 
> only. 
>

-- 
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/d/optout.

Reply via email to