You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is added to router the web socket runs and echo's correctly but obviously the html is not served whereas with it the websocket connects but then immediately disconnects when i run
wscat -c ws://172.16.4.60:59445/ws
i get both
Connected (press CTRL+C to quit)
Disconnected (code: 1006, reason: "")
immediately.
This is my Cargo.toml file
[package]
name = "quizpop"version = "0.1.0"authors = ["Zak Grivell <[email protected]>"]
edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
axum = { version = "0.7.9", features = ["ws"], optional=true }
dioxus = { version = "0.6.0", features = ["router", "fullstack"] }
tokio = { version = "1.42.0", features = ["full"], optional = true }
dioxus-cli-config = { version = "*", optional = true }
[features]
default = []
# The feature that are only required for the web = ["dioxus/web"] build target should be optional and only enabled in the web = ["dioxus/web"] featureweb = ["dioxus/web"]
# The feature that are only required for the desktop = ["dioxus/desktop"] build target should be optional and only enabled in the desktop = ["dioxus/desktop"] featuredesktop = ["dioxus/desktop"]
# The feature that are only required for the mobile = ["dioxus/mobile"] build target should be optional and only enabled in the mobile = ["dioxus/mobile"] featuremobile = ["dioxus/mobile"]
server = ["dioxus/server", "axum", "tokio", "dioxus-cli-config"]
[profile]
[profile.wasm-dev]
inherits = "dev"opt-level = 1
[profile.server-dev]
inherits = "dev"
[profile.android-dev]
inherits = "dev"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Not sure if I am just being silly but i cannot find a solution to this. I am trying to use web sockets within dioxus full stack,
When
is added to router the web socket runs and echo's correctly but obviously the html is not served whereas with it the websocket connects but then immediately disconnects when i run
i get both
immediately.
This is my Cargo.toml file
this is my main.rs
Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions