Coder Social home page Coder Social logo

Comments (6)

sbc100 avatar sbc100 commented on May 30, 2024 2

I was talking about WebSockets. Emscripten already an API for using WebSockets: https://emscripten.org/docs/porting/networking.html.

I'm not saying that the WebTransport should or should not try to build on this layer, but its something that we should consider. Whoever takes on this task should certainly have a good understanding of all the current networking APIs in emscripten and how they overlap.

from emscripten.

waywardmonkeys avatar waywardmonkeys commented on May 30, 2024 1

I'm interested in this as well and had looked a while back to see if anyone was standardizing on a C API for WebTransport and hadn't found anything yet.

(I stubbed out a crate for adding a C API to the Rust wtransport library, but haven't actually written any of the FFI yet as I hadn't found someone else doing similar yet. I thought it would be ideal if there were a native library with the same API as whatever happens in Emscripten.)

from emscripten.

sbc100 avatar sbc100 commented on May 30, 2024

Do you think it will be possible to implement most of this withing the existing WebSockets APIs that emscripten has, or would it need to be completely new API?

From the MDN page is sounds like this is kind of an extension of the existing WebSockets: "The WebTransport API provides a modern update to WebSockets".. so maybe we can do this with minimal user-visible change?

from emscripten.

troyedwardsjr avatar troyedwardsjr commented on May 30, 2024

@sbc100 If you were talking about POSIX sockets, then perhaps?

But if you're talking about the WebSocket API, IMHO I feel like there's a few functions like reliability(), datagrams(), congestion_control(), that are not available in WebSockets. I imagine a major benefit of WebTransport is that it allows finer grain control over networking.

Unless you were creating some general abstraction layer and was very explicit about that, I feel it'd be quite confusing to extend the WebSockets API with WebTransport functionality. From the perspective of a new user, I personally would be going "where is the WebTransport API", at least initially until reading further into some documentation that mentions this. It seems intuitively confusing. I would feel the same way if it were done this way for WebRTC.

from emscripten.

troyedwardsjr avatar troyedwardsjr commented on May 30, 2024

I'm interested in this as well and had looked a while back to see if anyone was standardizing on a C API for WebTransport and hadn't found anything yet.

(I stubbed out a crate for adding a C API to the Rust wtransport library, but haven't actually written any of the FFI yet as I hadn't found someone else doing similar yet. I thought it would be ideal if there were a native library with the same API as whatever happens in Emscripten.)

If you would like to get started on this, you could make a draft PR against Emscripten with some API proposal similar to websocket.h, but for WebTransport.

I'm a bit busy at the moment, but I'd potentially be interested in contributing. I think it would at least get the ball rolling. Two heads (or more) are better than one.

from emscripten.

opera-aberglund avatar opera-aberglund commented on May 30, 2024

Any updates on this? I'm also highly interested in the applications for this, especially multiplayer games in the browser.

from emscripten.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.