-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for WebSockets #16
Comments
another reason to support websocket, is that webtransport is not supported for now on safari. Which mean no support for default mac and ios AFAIK |
@mirsella It's a valid use-case, but is it actually possible to reliably detect if a browser won't work with WebTransport? Other than trying to ping a webtransport server. It seems that due to user privacy concerns, browser name and version are not available. |
only use websocket, or at minimum detect the OS (ios/macos, or other) is still possible ? this would not be something part of this crate, but user code anyway |
I'd rather only use websocket as a last resort, because it is not very compatible with the
I'd also want to check if
Agreed, and the lack of solution isn't a reason to block a websocket impl. I might add it this weekend. But I was wondering if you had a nice solution :) |
yeah websocket would just be a fallback is webtransport is not supported on some devices. to check if its supported, i think literally just edit: there's even probably a way to check for we transport support using web-sys or js-sys crate |
Ok I did some research, and looks like the So it should be sufficient to attempt to construct a fake |
Added detection functions in 3e7125d. Unfortunately it won't detect browser bugs like BiagioFesta/wtransport#241. |
looking at the issue you linked, from what I understood it's not a bug but the latest version of browser are blocking self signed certificate something like that I think for "security" |
I don't think so. If they didn't want to support self-signed certs then they would not support the |
well it's still possible to use self signed certificate by enabling a feature flag in the settings, so they're not removing it, just blocking it by default. removing serverCertificatesHashes would break a lot of things imo. anyway, I don't think this is important for this issue. |
Implemented in 4acb9bc |
Hello @UkoeHB , I'm trying to use renet2 as part of a Godot 3.5 project with gdnative bindings. I would like to compile for the web, and as far as I've seen, Godot 3.5 only supports WebSockets and WebRTC for html5 exports. A WebSocket implementation for renet2 seems relatively simple as most of the logic for an http based protocol is already implemented in the current WebTransport one.
I think it should work if I can get a custom renet2 transport client that works using gdnative's
WebSocketClient
bindings.I suggest to add at least a server implementation of WebSockets to renet2. As for a client implementation to add to renet2, maybe there could be one for native builds that uses
tungstenite
, and another for wasm builds that uses wasm-bindgen bindings similar to the WebTransport client impl.The text was updated successfully, but these errors were encountered: