I am writing an Android app and calling into a rust library from Java using JNI. The rust application uses
ws-rs for websocket connections.
When the websocket connection is made and when the client tries to send the Handshake message via the TcpStream, a null pointer dereference crash is observed.
mio under the hood and I tried to make the connection non-blocking (as the connect() call sometimes returns
EINPROGRESS, just to rule that out. But that didn’t help.
I would appreciate any help.
- Here is the rust code that is called by Java: https://github.com/vu3rdd/magic-wormhole.rs/blob/android/io/blocking/src/lib.rs#L110
- Here is the
- This question seem related, but I couldn’t make much progress with it: How to get TcpStream to work in WASM?