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
JVM Version, Operating System and Relevant Context
Android 9
Feedback
I am trying to do non-blocking IO (testing via doing network on main thread on Android and see where NetworkOnMainThreadException occurs), however, both CIO and Apache seems to fail in doing DNS resolving.
Is it possible or planned to implement completely non-blocking HTTP requests?
CIO
In CIO, the main thread attempts to resolve DNS at io.ktor.client.engine.cio.Endpoint.(Endpoint.kt:29).
I don't think there is any way to get around that.
Apache
Similar thing happens to Apache. I found that there is a way to customize DnsResolver like such:
Ktor Version
1.2.2
Ktor Engine Used(client or server and name)
client CIO or Apache
JVM Version, Operating System and Relevant Context
Android 9
Feedback
I am trying to do non-blocking IO (testing via doing network on main thread on Android and see where NetworkOnMainThreadException occurs), however, both CIO and Apache seems to fail in doing DNS resolving.
Is it possible or planned to implement completely non-blocking HTTP requests?
CIO
In CIO, the main thread attempts to resolve DNS at io.ktor.client.engine.cio.Endpoint.(Endpoint.kt:29).
I don't think there is any way to get around that.
Apache
Similar thing happens to Apache. I found that there is a way to customize DnsResolver like such:
Unfortunately, apache DnsResolver does not support suspend/async calls, so sadly I cannot take advantage of new nonblocking API provided by Android API 29.
The text was updated successfully, but these errors were encountered: