More and more projects need to use real-time message push and receive, how to use C (+ +) is the most convenient now? I recommend that you use the Goeasy, it is a third-party push service platform, using its API can easily take care of real-time push!
Browser compatibility: Goeasy push supports websocket and polling two connections to support all versions of IE6 and above, while also supporting other browsers such as Firefox, Chrome, Safari, and more.
Support for different development languages: The Goeasy push provides a RESTful API interface that enables real-time push through RESTFULAPI, regardless of which language your daemon uses. such as: Java, PHP, C #, Ruby, Python, C, C + +, ASP.
Support backstage and front-end push: Backstage with restful API, front desk with goeasy.js, use very simple!
C (+ +) Web real-time messaging backend server push technology
Let me introduce you to the steps of using Goeasy:
1. You need to register an account with the Goeasy website and create an app that will generate two key:publish keys and subscribe keys by default when the app is created.
2. Front-desk real-time subscription and reception
Simply introduce Goeasy.js and then call Goeasy's Subscribe method to subscribe to a channel, either with publish key or subscribe key at the time of subscription. The callback function of the subscribe parameter onmessage can receive the message in real time.
3. Front-desk real-time push
It is still necessary to introduce goeasy.js (if the page has already been introduced and not be introduced), and then call Goeasy's publish method to push the message to the subscribed channel, with only publish key being pushed.
4. Real-time push in the background
Call the goeasyrestful API and use post to access the Http://goeasy.io/goeasy/publish, along with the three necessary parameters:
Appkey:publish Key
Channel: The channel you subscribed to
Content: Push Contents
It's that simple.
C (+ +) Web real-time messaging backend server Push technology---goeasy