BiagioFesta / wtransport

Async-friendly WebTransport implementation in Rust
Apache License 2.0
397 stars 26 forks source link

Working with Desktop clients #64

Open ValorZard opened 12 months ago

ValorZard commented 12 months ago

Looking at this repo, it seems pretty cool. However, I'm curious. Could you use this library to make a desktop client, and have it be able to connect to the same server and communicate with a web-based client?

BiagioFesta commented 12 months ago

Yes.

Just like WebSocket, you can use WebTransport as a general-purpose protocol.

However, WebTransport provides some benefits, such as standard cryptographic features embedded in the protocol (security by default) instead of adding an extra layer on top, as WebSocket or HTTP do. It also offers the possibility to have multiple independent "streams" of data within the same connection.

WebTransport has been introduced in recent browser versions, making it easy to create a web client with a native JavaScript API. For example, you can find more information on how to use it in the Mozilla Developer Network documentation.

Similar to other common network protocols, WebTransport uses a client-server architecture.

Therefore, you can create a desktop client that communicates using WebTransport and interacts with a server, which acts as an intermediary to facilitate communication with another client using web technology (browser API).

This library (at least that's the objective :) ) should provide a simple but effective API to write an application in Rust (both client or server) using WebTransport as a communication protocol

tausifcreates commented 11 months ago

@BiagioFesta I have high hopes for this project. Wish you the best.