View Full Version : تفاوت HttpURLConnection و URLConnection در چیه؟
abbasalim
جمعه 26 اردیبهشت 1393, 00:49 صبح
بنام خدا
سلام
دوستان تفاوت HttpURLConnection و URLConnection در چیه؟
من چیزی که فهمیدم از استک اور فلو این بود که چندتا کاربرا گفته بودن HttpURLConnection سرعتش بیشتره!(؟)
آیا سرعتش بیشتره؟ آیا چه تفاوتی داره؟
من میخوام به یه url وصل شم و بهش اطلاعات بدم کدومش سریع تره؟بهتره؟فرقش چیه؟
Aryan21
جمعه 26 اردیبهشت 1393, 11:43 صبح
Which client is best?
Apache HTTP client has fewer bugs on Eclair and Froyo. It is the best choice for these releases.
For Gingerbread and better, HttpURLConnection is the best choice. Its simple API and small size makes it great fit for Android. Transparent compression and response caching reduce network use, improve speed and save battery. New applications should use HttpURLConnection (http://developer.android.com/reference/java/net/HttpURLConnection.html); it is where we will be spending our energy going forward.
نقل قول بالا از بلاگ توسعهدهندگان اندروید هست و پیشنهاد میده برای جینجربرد به بعد از
HttpURLConnection استفاده کنید.
abbasalim
جمعه 26 اردیبهشت 1393, 16:58 عصر
ممنون من برنامم فقط برروی نسخه های 4 به بالا قراره اجرا بشه و طبق آزمایشی که خودم انجام دادم واقعا سرعت HttpURLConnection بیشتره . من دوتا اطلاعات رو میگرفتم یکی خیلی سریع بود و یکی نسبت به قبلی خیلی آهسته برام سوال شده بود که دلیلش چی میتونه باشه که دیدم اولیش با HttpURLConnection و دومی با URLConnection اتصال داده
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.