Joke Collection Website - Public benefit messages - How to operate Alibaba Cloud API gateway websocket two-way communication registration signaling?

How to operate Alibaba Cloud API gateway websocket two-way communication registration signaling?

Alibaba Cloud API Gateway provides two-way communication capability to the outside world. The languages of official SDK are limited, and some languages need users to develop their own SDK.

When the client calls the API, the request and reply are all strings in pure Json format, that is, the HTTP request object is formatted according to Json syntax and then transmitted. WebSocket will format this HTTP request message into a string format for transmission during communication.

In the process of two-way communication, in addition to normal API calls, there are a series of customized commands:

Client registration: command word, command type, sender, format, etc.

Client keeps heartbeat:

Downlink notification:

Other signals: