lui*_*dez 2 sockets android node.js sails.js
有任何想法如何在android中制作socket.get()请求?
我试试这个:
JSONObject obj = new JSONObject();
obj.put("url","/controller/action");
socketClient.emit("get",obj);
Run Code Online (Sandbox Code Playgroud)
服务器响应是:
Error (SAILS:HOOK:SOCKETS:PARSE_VIRTUAL_REQ):: Failed to parse incoming socket.io request
...
details: 'Sails v0.11.x is not compatible with the socket.io/sails.io.js client SDK version you are using (0.9.0). Please see the v0.11 migration guide on http://sailsjs.org for more information.'
Run Code Online (Sandbox Code Playgroud)
只需将您的网址更改为以下内容即可
http://xxx.xxx.xxx.xxx:1234/?__sails_io_sdk_version=0.11.0
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1228 次 |
| 最近记录: |