davidfowl / BedrockFramework

High performance, low level networking APIs for building custom servers and clients.
MIT License
1.05k stars 153 forks source link

Blazor WASM support #131

Closed KieranDevvs closed 2 years ago

KieranDevvs commented 2 years ago

Is it possible to make this work with Blazor WASM? I already have a desktop client which references a client library that abstracts the networking away from the UI (using bedrock). It would be nice if I could reuse the same client library in Blazor WASM.

Currently im having to have two separate libraries, one for Blazor WASM using ClientWebSocket and one for everything else using Bedrock.

davidfowl commented 2 years ago

This wouldn't work in the browser since in the browser, you need to interop with websocket APIs to do websockets. Bedrock implements the entire protocol which requires access to the underlying networking stack. Something blazor wasm doesn't have access to.