We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to send from the socket io server an emit_with_ack event. But I don't see how I can ack from the client
emit_with_ack
async fn handler(payload: Payload, socket: Client) { let values = match payload { Payload::Text(values) => values, Payload::Binary(_) => panic!("unexpected bytes"), #[allow(deprecated)] Payload::String(_) => panic!("Payload::String panicked"), }; tracing::info!("got values: {values:?}"); // how do I ack here? } async fn run(config: &Config, hostname: &Hostname) -> anyhow::Result<()> { let socket = ClientBuilder::new(format!("{}?h={}", config.backend_domain, hostname)) .namespace(ws::NS) .on(ws::COMMAND, |payload, socket| { handler(payload, socket).boxed() }) .on("error", |err, _| { async move { tracing::error!(error = ?err, "socket io error") }.boxed() }) .connect() .await?; std::future::pending::<()>().await; socket.disconnect().await?; drop(socket); Ok(()) }
I've tested and I do get a value in here but I can't ack. Is this just not implemented yet or am I missing something?
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I want to send from the socket io server an
emit_with_ack
event. But I don't see how I can ack from the clientI've tested and I do get a value in here but I can't ack. Is this just not implemented yet or am I missing something?
The text was updated successfully, but these errors were encountered: