We implemented async BSD sockets stuff, enough to run ENet basically. It
uses websockets or WebRTC under the hood. Neither is a "normal" TCP
channel, but you can convert. For example see the emscripten
tests/test_sockets.py test suite for sockets stuff, it runs native servers
and wraps then with websockify, which makes a TCP server into a websockets
server.

This should work in any browser supporting websockets and/or webRTC binary
messages. Websockets is widely supported. WebRTC binary was only in firefox
nightly back when the demo came out, hopefully it's more widespread by now.
Note that the demo uses webRTC, but it could be changed to use websockets.

Ping ack on the emscripten irc channel regarding the bananabread server he
was maintaining.

- Alon



On Fri, Jun 20, 2014 at 8:47 AM, Mike Kasprzak <[email protected]>
wrote:

> Hey Alon,
>
> I was curious if I could get you to comment a bit on UDP networking and
> the Enet port found inside Bananabread. From what I gather, the Enet code
> itself is nearly stock with just 2 minor changes (__EMSCRIPTEN__ checks),
> so that means you guys implemented some or all of BSD sockets behind the
> scenes. I'm curious about how practical Enet for Emscripten is, but there
> really isn't much information out there. All I know is it's supposed to
> work in Firefox, but I didn't have much luck.
>
> - Are the packets compatible with regular Enet, or is WebRTC introducing
> some extra data in to them?
> - Does this still require 'Firefox Nightly' to work, or some command line
> argument on startup (i.e. not a 'enabled by default' feature)?
> - Is the Chrome side fixed? Following the link to the mentioned bug, it
> was apparently 'fixed' earlier this year.
>
> In my very brief test with the latest Chrome and Firefox, I noticed I was
> unable to see any Bananabread multiplayer servers, even after creating a
> game myself.
>
> The fact that there is an Enet Emscripten port just seems too good to be
> true. I need to be brought back down to reality. ;)
>
> Thanks,
> Mike
>
> --
> 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.
>

-- 
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