上位机打开监听程序,监听端口2323,接收来自OneNET云平台的推送消息,消息采用http post方式传递,符合http协议,实际传送内容采用JSON格式。
POST / HTTP/1.1
Content-Type: application/json;charset=utf-8
Content-Length: 197
Host:45.32.80.133:2323
Connection:Keep-Alive
Accetp-Encoding: gzip
User-Agent: okhttp/3.4.1
{"trigger":{"id":52240,"threshold":1,"type":"=="},"current_data":[{"user_id": 93432,"dev_id":"10985117","ds_id":"hcsr501","at":"2017-08-06 16:55:38.346", "value": 1}]} |