Android and iOS long connection differences

Source: Internet
Author: User

http://blog.csdn.net/zhangzeyuaaa/article/details/39028369

First we must know that all push functions must have a long connection between the client and the server, because the push is initiated by the server to send a message to the client, if there is no long connection between the client and the server then the server is unable to actively connect the client. Thus the push function is based on the long connection basis.

iOS long connections are maintained by the system, which means that Apple's iOS system maintains a long link between the client and Apple servers at the system level, and pushes all apps on iOS to the Apple server and pushes the Apple server through the system-level long link to the phone terminal. A few of the benefits of this are:1. Always maintain a long connection on the phone terminal, and because this long link is at the system level will not be killed and cannot push the situation. 2. power saving, does not appear each application maintains its own long connection. 3. security, only in Apple registered developers can push, and so on.

Android's long connection is maintained by each application, but Google has also launched a push framework similar to Apple's technology architecture, C2DM, Cloud push, but because Google's servers are not in China, other reasons you know. So the push can't be used, Android developers have to maintain a long link, so each application if all 24 hours online, then all have to maintain a long connection, this power and traffic consumption is conceivable. Although a variety of push platforms have appeared in the country, they are unable to achieve the level of maintenance that only a long connection consumes.

Android and iOS long connection differences

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.