Search code examples
androidretrofitniononblockingandroid-networking

HTTP Request framework for Android that supports non-blocking IO


I have been looking for a "NON-BLOCKING IO" HTTP Request framework but having hard time finding much. Looked at OkHttp, Retrofit and few others but looks like both of them don't do non-blocking IO (unless I missed something) - they manage a tread pool and send somewhat blocking requests through blocking individual threads.

Looks like android supports non-blocking network IO through something called "nio channels" "https://developer.android.com/reference/java/nio/channels/package-summary" but don't want to reinvent the wheel and would rather use some existing HTTP framework to send request that raw sockets, if there is one.

Anyone has any ideas?


Solution

  • You might find what you're looking for in Netty 4.1. It has official Android Support, and is non-blocking front-to-back.