Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Androidアプリケーションで永続的なhttp接続を確立したい。バックエンド応答はKeep-Alive用に構成されているため。
毎回ハンドシェイクリクエストを回避するために、Androidで永続的なhttp接続を確立する方法を知りたいです。
キープアライブリクエストを含めるようにヘッダーを設定します。
HttpURLConnection conn = (HttpURLConnection) mURL.openConnection(); conn.setRequestProperty("Connection","Keep-Alive");