Personal summary, personal summary

Source: Internet
Author: User

Personal summary, personal summary

Push: supports remote push and local push.

Remote push: As the name implies, it refers to the messages pushed from the apple server. This push requires the deveiceToken and UDID of the target device. The former is provided to the Apple Server by the program server, the latter is a live product of the Apple Server. Based on the two, messages can be pushed to the specified target only.

Local push: it is not pushed by Apple's official server. The most common push is Aurora push. Its usage principle is implemented by adding a heartbeat packet through socket, socket can be understood as determining whether a device is used. It is an IP address + protocol + port number. heartbeat packets are used to continuously send messages to the client to determine whether the user is online. If not, they must be pushed remotely. If they are online, they must be pushed locally.

 

Instant Messaging: common methods include XMPP, huanxin, and rongyun.

XMPP: the instant messaging protocol officially provided. because it is instant messaging, it uses its own server for communication, which requires a common local server (openfire server ). its communication architecture is a C/S architecture. Its communication principle is implemented through socket. It transmits XML data streams during transmission. therefore, XMPP communication requires two conditions: openFire server and XMPP framework.

XMPP usage principle: it is a C/S architecture mode, so the principle is that the client uses

TCP/IP connects to the server, establishes a link through socket, and then transmits XML data streams through the channel.

Huanxin: huanxin is an encapsulation of the official instant messaging protocol. Therefore, it uses the same principle. The advantage of huanxin is that you do not need to create a server on your own.

How to Use huanxin: register as a developer and obtain the appkey. Download the SDK. Follow the instructions in this document.

 

Usage differences:

XMPP: It is troublesome to send attachments. this is because XMPP does not provide the function of sending attachments. To send attachments, you must implement it by yourself. The implementation method is: first upload the file to the file server and then obtain the file path, finally, send the file path to your friend.

Note: When parsing data returned by XMPP, The kissXML framework is used instead of the common frameworks.

Huanxin: integrated with the server for easy use, data caching, and audio/video sending.

Related Article

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.