iOS Push-b/s architecture-socket

Source: Internet
Author: User

b/S Architecture project, a user logged in after the execution of certain actions need to log on the mobile phone corresponding users to push messages

Through the socket implementation

1.socket server: Using the C # window service (the service listens on two ports: platform 8889, Mobile 8881, for example)

2. Platform: In the background interface processing, through the IP and port 8889 connection socket service, send data, the format can be as follows: send|userid| Msg

3. Mobile: Create a long socket connection, access IP and Port 8881, while sending data to the socket service, the format can be as follows: phone|userid| Phone

Implementation: The socket server through the resolution platform and the data sent by the mobile phone comparison, and then by the platform to send the message content sent to the corresponding phone, the phone received the socket server sent over the message after processing, send a local notice (around the Apple APNs, However, when the program enters the background, the socket will be suspended, no messages will be received, and additional processing is required.

The same mobile phone after performing a certain action need to send a message is through the platform background interface access 8889 port and then sent to the phone

iOS Push-b/s architecture-socket

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.