Closed MateusArthur closed 7 months ago
Have you tried using a recent quinn version?
I tried with recent Quinn version, it seems like nested Tokio's spawn does not work in android. There is a tokio::spawn here in "tokio::spawn(process_connection(connecting));" and Endpoint::new_with_abstract_socket will call another tokio::spawn.
I doubt that is the case; Android should work about the same as (old) Linux. Regardless, if you think you have a tokio bug, raise it with tokio.
Closing as the original reporter never responded.
I updated the version and everything worked fine.
Thanks for the update!
Hello, I'm trying to make a connection from a client to a rust server using quinn 0.7.2, but when I try to connect on Android I get 'timeout'. I've already checked that my server works correctly because when I try to run the same code on Windows the connection works perfectly. Which leads me to believe that Android has some limitation in relation to Quin. I am compiling using the android armeabi-v7a architecture and for android 5+ versions. Here is the command I use to compile the client:
cargo ndk -t armeabi-v7a -p 21 -- build --release
. On the server side I am usingcargo +nightly-i686 build --release --no-default-features
to compile the server. The connection reaches the server and times out when it arrives in theaccept_connection
function. What am I doing wrong? What should I check?Server side:
Client Side:
I call the iniciar_teste() function in c++ using jni it calls normally but it stops on the server at: quinn::ConnectionError::TimedOut => println!("Connection timed out"),
So are there any limitations in relation to Android? I don't know what it could be. Remembering: When compiling the client for PC it works normally!
Cargo.toml client
[lib] name = "src" crate-type = ["staticlib"]
dependencies on both:
[dependencies] quinn = "0.7.2" futures-util = "0.3.17" tokio = { version = "1.11", features = ["full"] } slotmap = "1.0.6" anyhow = "1.0.44" rcgen = "0.8.13"