C# Websocket message push---GoEasy


Goeasy, it is a third-party push service platform, using its API can easily get real-time push! Personally, I feel that goeasy push is more stable, the push speed is fast, and the code is simple and easy to understand. Browser compatibility: GoEasy push supports two connection methods, websocket and polling , so that it can support all versions of IE6 and above, as well as other browsers. Such as Firefox, Chrome, Safari , etc. Support for different development languages:     GoEasy Push provides a Restful API interface, no matter which language your background program uses, you can use Restful API to achieve real-time background push. Such as: Java, PHP, C#, Ruby, Python, C, C++ , ASP.NET, Node.js... Support background and foreground push: Restful API is used in the background , and goeasy.js is used in the foreground; it is very easy to use!



The principle of push: The implementation principle of GoEasy is very simple, that is, one end of the push message is only responsible for pushing, and the pages that need to be received need to be subscribed in advance. Subscribe to what? Subscribe to the channel . When a message is pushed to a channel , the client subscribes to the same channel, which ensures accurate reception. Through the channel , we can specify which pages or which users can receive the messages pushed from this channel .


C# Websocket
message push


Let me introduce the steps of using GoEasy :
1.
You need to register an account on the goeasy official website and create an application. After the application is created, the system will generate two keys for it by default: publish key and subscribe key 2. Real-time subscription in the foreground And to receive , you only need to introduce goeasy.js, and then call goeasy 's subscribe method to subscribe to a channel . You can use publish key or subscribe key when subscribing . The message can be received in real time through the callback function of the parameter onMessage of subscribe . 3. The front-end real-time push still needs to introduce goeasy.js (if the page has already been introduced, it may not be introduced) , and then call the publish method of goeasy to the subscribed

   


   
You can push messages on the channel , and only use the publish key when pushing .
4.
Call the GoEasyRestful API for real-time push in the background , access http://goeasy.io/goeasy/publish in post mode , and also need to bring three necessary parameters:     appkey: publish key     channel: channel you subscribed    content: push content
     



Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327066973&siteId=291194637